conditional statement help

D

Doug

I would like to make a 2 conditions for my expenses...
The first condition is to do the math if I have rent for house #3 (as
evidenced by a number placed in that cell) vs. the 2nd conditon is if
I have no rent for that house (zero or null cell). By do the math, I
mean to execute a series of cells that follow but if there is no rent
(null or void cell for hse #3) then execute a different group of cells
perhaps in another row or column.

Can you give me an example how I could do this... perhaps with a true
or false statement??? Last, if I have a 3rd house with rent and
then it executes some cells after that, how would I make a condition
next if house number4 has rent, what are my expenses with or without
hse #4's rent? Sorry if I confuse anyone.....
 
S

Scion

Doug spake thus:
I would like to make a 2 conditions for my expenses...
The first condition is to do the math if I have rent for house #3 (as
evidenced by a number placed in that cell) vs. the 2nd conditon is if I
have no rent for that house (zero or null cell). By do the math, I
mean to execute a series of cells that follow but if there is no rent
(null or void cell for hse #3) then execute a different group of cells
perhaps in another row or column.

Can you give me an example how I could do this... perhaps with a true or
false statement???

Use IF with ISBLANK

IF (Statement, formula-if-true, formula-if-false)

So if you want to look for blank or zero in cell A1, and if it is blank or
zero you want to add up B1 to B4 and if it is not blank or zero you want
to add up C1 to C4 you would put:

=IF(OR(ISBLANK(A1),A1=0),SUM(B1:B4),SUM(C1:C4))


Last, if I have a 3rd house with rent and then it
executes some cells after that, how would I make a condition next if
house number4 has rent, what are my expenses with or without hse #4's
rent? Sorry if I confuse anyone.....

Not sure what you mean by this, but perhaps you can alter the formula I've
given to do what you want?
 
D

Doug

Doug spake thus:


Use IF with ISBLANK

IF (Statement, formula-if-true, formula-if-false)

So if you want to look for blank or zero in cell A1, and if it is blank or
zero you want to add up B1 to B4 and if it is not blank or zero you want
to add up C1 to C4 you would put:

=IF(OR(ISBLANK(A1),A1=0),SUM(B1:B4),SUM(C1:C4))




Not sure what you mean by this, but perhaps you can alter the formula I've
given to do what you want?


Thank you. I think you gave me enough info to figure the rest out.
Thanks again...
 
D

Doug

Doug spake thus:


Use IF with ISBLANK

IF (Statement, formula-if-true, formula-if-false)

So if you want to look for blank or zero in cell A1, and if it is blank or
zero you want to add up B1 to B4 and if it is not blank or zero you want
to add up C1 to C4 you would put:

=IF(OR(ISBLANK(A1),A1=0),SUM(B1:B4),SUM(C1:C4))




Not sure what you mean by this, but perhaps you can alter the formula I've
given to do what you want?


Scion, just followed your instructions in my spreadsheet and it worked
like a charm. I've got it set up to compute based on a number in a
different cell or if that different cell is blank, I see "n/a" .
Appreciate your help again !!!
 
S

Scion

Doug spake thus:
Scion, just followed your instructions in my spreadsheet and it worked
like a charm. I've got it set up to compute based on a number in a
different cell or if that different cell is blank, I see "n/a" .
Appreciate your help again !!!

You are welcome.

I use ISBLANK extensively where I've got rows of numbers that get filled
in say one row per day. If the cell is blank then I put "" in the
calculated cell. This means I can copy the calculation formula down 1,000
rows but the results don't show unless there's a relevant entry, I don't
see a column of zeroes.
 

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