IF...THEN syntax question

  • Thread starter Thread starter Adam
  • Start date Start date
A

Adam

I have a lengthy spreadsheet with thousands of entries.
It is property transaction data. There are four columns
that describe garage square footage and I would like to
slim this down to a simple yes/no if there is a garage.

I would like to write this statement:IF A1:A4>0 THEN 1, IF
A1:A4=0 THEN 0 to create a binary yes/no situation.

What is the proper syntax?
Any help is appreciated!

ADAM
 
Adam,

I presume you mean if the total length of A1:A4 > 0 . If so, then you can
use

=if(SUM(A1:A4)>0,1,0)

or more succinctly

=--(SUM(A1:A4))


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Adam,

You can use an AND or an OR as array functions:

If you need all values to be >0 in order to consider it as
a garage, use:
{=+AND(IF(A1:A4>0,1,0))}
If only one value needs to be >0 use:
{=+OR(IF(A1:A4>0,1,0))}

Paste (or drag) this formula in every row on your database

These formulas will return FALSE or TRUE, wich can be
converted to 0/1 by multiplying by 1

*Remember that when you introduce array formulas you
should use ctrl+alt+enter
 
Back
Top