Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
FC FC is offline
external usenet poster
 
Posts: 130
Default Adding and Sustracting

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



  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 185
Default Adding and Sustracting

FC

You need an IF function, like

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

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
web:
www.nickhodge.co.uk
blog (non tech): www.nickhodge.co.uk/blog


"FC" wrote in message
...
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




  #3   Report Post  
Posted to microsoft.public.excel.misc
FC FC is offline
external usenet poster
 
Posts: 130
Default Adding and Sustracting

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.
"Nick Hodge" wrote:

FC

You need an IF function, like

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

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
web:
www.nickhodge.co.uk
blog (non tech): www.nickhodge.co.uk/blog


"FC" wrote in message
...
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




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Adding and Sustracting

Either of these

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

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


Gord Dibben MS Excel MVP

On Sat, 27 Oct 2007 07:09:00 -0700, FC wrote:

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.
"Nick Hodge" wrote:

FC

You need an IF function, like

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

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
web:
www.nickhodge.co.uk
blog (non tech): www.nickhodge.co.uk/blog


"FC" wrote in message
...
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





  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default Adding and Sustracting

FC" wrote in message
...
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


Replace @mailinator.com with @tiscali.co.uk


"FC" wrote in message
...
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








  #6   Report Post  
Posted to microsoft.public.excel.misc
FC FC is offline
external usenet poster
 
Posts: 130
Default Adding and Sustracting

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


"Sandy Mann" wrote:

FC" wrote in message
...
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


Replace @mailinator.com with @tiscali.co.uk


"FC" wrote in message
...
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







  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default Adding and Sustracting

FC" wrote in message
... 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


Replace @mailinator.com with @tiscali.co.uk


"FC" wrote in message
...
Common sense Sandy Mann, works perfectly, SMART!
Thanks for your formula Gord Dibben, it works perfect too.


"Sandy Mann" wrote:

FC" wrote in message
...
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


Replace @mailinator.com with @tiscali.co.uk


"FC" wrote in message
...
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










Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with adding 10% Jennifer Excel Worksheet Functions 2 January 31st 07 08:56 PM
Adding hrs demetri Excel Worksheet Functions 3 November 18th 05 11:25 PM
Adding STEVEB Excel Discussion (Misc queries) 2 November 9th 05 02:32 PM
Need help adding : Mark Excel Worksheet Functions 2 August 18th 05 03:59 PM
Adding Sum nono Excel Discussion (Misc queries) 1 August 3rd 05 09:20 AM


All times are GMT +1. The time now is 11:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"