Conditional functions

R

Rednelle

Greetings from a newbie,

I hope I am in the right group for this query, if not please redirect me.

I cannot understand, from Microsoft Help or from Halvorson's 'Running Office
2000', how to create a nested function.

I am building a simple worksheet with 3 columns: debit [e], credit [f],
balance [g].
I want to put a function/formula in the balance column - lets say for row
'n' -

IF [e]'n' is blank AND [f]'n' is blank then display [g]'n' blank else
display [g]'n' = Sum ([g]'n-1' - [e]'n' + [f]'n')

So when I copy the expression down column 'g' and then print the sheet I
don't see anything in fields [g]'n+1' thro [g]'n+x'

Could someone please write the expression for me, and post, so that I can
see the syntax.

Thanks in advance.

Rednelle
 
F

Frank Kabel

Hi
in G2 put
=IF(AND(E2="",F2=""),"",G1-E2+F2)
and copy this down

in G1 you probably have to enter a formula such as
=IF(AND(E1="",F1=""),"",-E1+F1)
 
D

Dave R.

It maybe easier next time to use some row like "1" rather than 'n', and not
neccessary to put the column in [ ] either.. just makes it harder to read.

Try

=IF(AND(e2="",f2=""),"",g1-e2+f2)

You also don't need the SUM there, and I think I understood you want to pull
from the row above where you wrote 'n-1' ...
 
R

Rednelle

Dave R,

Thanks a lot for the expression which does just what I want.

Once you see the syntax it is almost blindingly obvious.

I guess the Halvorson reference is particularly good if all you really
want to do is make cosmetic changes.

Thanks too for your advice on how to express oneself when writing to a
newsgroup.

Rednelle


Dave R. said:
It maybe easier next time to use some row like "1" rather than 'n', and not
neccessary to put the column in [ ] either.. just makes it harder to read.

Try

=IF(AND(e2="",f2=""),"",g1-e2+f2)

You also don't need the SUM there, and I think I understood you want to pull
from the row above where you wrote 'n-1' ...



Rednelle said:
Greetings from a newbie,

I hope I am in the right group for this query, if not please redirect me.

I cannot understand, from Microsoft Help or from Halvorson's 'Running Office
2000', how to create a nested function.

I am building a simple worksheet with 3 columns: debit [e], credit [f],
balance [g].
I want to put a function/formula in the balance column - lets say for row
'n' -

IF [e]'n' is blank AND [f]'n' is blank then display [g]'n' blank else
display [g]'n' = Sum ([g]'n-1' - [e]'n' + [f]'n')

So when I copy the expression down column 'g' and then print the sheet I
don't see anything in fields [g]'n+1' thro [g]'n+x'

Could someone please write the expression for me, and post, so that I can
see the syntax.

Thanks in advance.

Rednelle
 

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