Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

comp macro value pls help

  Asked By: Anubis    Date: Nov 28    Category: MS Office    Views: 940
  

I have an excel sheet which shows the comp data as TRUE ,FALSE in
the cells as shown below

col 1 col 2 col3
TRUE FALSE TRUE

FALSE FALSE TRUE


This comparison data is of two xls sheets & the formula is

if cell 1 = cell2 then TRUE else FALSE

Now i have to get the value from the comp sheet above where ever it
is FALSE...

However when iam fecthing the values from cells by using cells
(row,col).value method its giving 0 & -1 respectivly for False and
true vales respectivly when this is done on a sheet which has formula
in it...

However when i use same method to get the vales of the cells without
using the formula in it say just by wrieting FALSE OR TRUE
the ceels(row,col).value retuns the actual value TRUE & false
respectivly..


Please suggest to how get the actual value from comparsion sheet
having values as TRUE and false by cells(row,col).value method ?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Utsav Shah     Answered On: Nov 28

It sounds as though you are typing the string "FALSE" or "TRUE" into the
cell when you type it yourself. This is not the same as the Boolean
values False and True which you will get as the result of an IF or by
using the Boolean values  in a statement as you have done in

> if cell  1 = cell2 then TRUE else FALSE

If you really want the words TRUE or FALSE in the cell, then you need to
assign them as strings ...

> if cell 1 = cell2 then "TRUE" else "FALSE"

 
Didn't find what you were looking for? Find more on comp macro value pls help Or get search suggestion and latest updates.




Tagged: