IF...THEN syntax question

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
 
B

Bob Phillips

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)
 
F

Felipe I

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top