Using Function IF

C

cihow81

Cell A1 is a variable
Cell A2 is a variable
Cell A6=IF(ABS(A1-A2)<2,TRUE,FALSE)

Instead of Displaying True and False when data are inserted into the cells,
could i display other words, such as YES and NO? If can, how do i do it?
 
J

Jack Sheet

One way:
Change formula in A6 to
=IF(ABS(A1-A2)<2,TRUE,FALSE)*1
and custom number the cell to be:
"YES";;"NO"

Another way:
Change formula in A6 to
=IF(ABS(A1-A2)<2,"YES,"NO")

The first method is probably preferred if there are other cells with
formulae that refer to cell A6 and expect it to contain a boolean value.
 
G

Gabriele

Dear chihow,

yes you can. The formula would look liie this: A6=IF(ABS(A1-A2)<2,"yes","no")
 
Top