Adding and Sustracting

G

Guest

I need a double formula if that's possible.
1 Worksheet A,B,C,D from 1 to 100 all columns.
For explanatories purposes I ll use just the first row ( formula will be
copied down to 100)
D1=A1+B1
but if there is not value in B1, then it will be a value in C1 and the
formula instead of adding will sustract.>> D1=A1-C1
A1 will always has a value
B1 and C1 will alternate ( one of the 2 is empty while the other has a value)
D1 will be the total, either from adding B1 or sustracting C1( depending who
has the value) from A1.
Legend : value= number
XL 2003
 
G

Guest

Thanks for the formula, but it did not meet the requirements. I know is
almost that one but can not make it up!!!
Thanks for repling.
 
G

Gord Dibben

Either of these

=IF(B1<>"",A1+B1,A1-C1)

=IF(B1="",A1-C1,A1+B1)


Gord Dibben MS Excel MVP
 
S

Sandy Mann

FC said:
B1 and C1 will alternate ( one of the 2 is empty while the other has a
value)

If that is the case then and the cells are truely empty not just showing an
empty string then:

=A1+B1-C1

will work because the empty cells will be treated as zero values.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
G

Guest

Common sense Sandy Mann, works perfectly, SMART!
Thanks for your formula Gord Dibben, it works perfect too.
 
S

Sandy Mann

Common sense
Sandy Mann, works perfectly, SMART!

You're very welcome.

"But he's got no clothes on!" <g>


--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 

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

Similar Threads

IF 4
Format of cell 1
Excel 2007 storing the high and low 3
Value if two cells are true 2
[HELP]CLOCK TIMER USING ECXEL 0
Format of cell 1
"Up to" function? 3
How do I get a total 3

Top