#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 141
Default Nested if

Thius is a stupid question but I cannot for the life of me work it out

the calculation I need is

if C4=0 or if D4 = 0 then 0 else c4-d4
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default Nested if

Try this:

=IF(OR(C4=0,D4=0),0,C4-D4)

Hope this helps.
--
Kevin Backmann


"Nigel" wrote:

Thius is a stupid question but I cannot for the life of me work it out

the calculation I need is

if C4=0 or if D4 = 0 then 0 else c4-d4

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Nested if

You don't need to nest IFs.
=IF(OR(C4=0,D4=0),0,C4-D4)

If you particularly want to nest IFs:
=IF(C4=0,0,IF(D4=0,0,C4-D4))
--
David Biddulph

"Nigel" wrote in message
...
Thius is a stupid question but I cannot for the life of me work it out

the calculation I need is

if C4=0 or if D4 = 0 then 0 else c4-d4



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 141
Default Nested if

No that doesn't work

"Kevin B" wrote:

Try this:

=IF(OR(C4=0,D4=0),0,C4-D4)

Hope this helps.
--
Kevin Backmann


"Nigel" wrote:

Thius is a stupid question but I cannot for the life of me work it out

the calculation I need is

if C4=0 or if D4 = 0 then 0 else c4-d4

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default Nested if

Unless you formulated your intitial question incorrectly, it works just fine.
Dave Biddulph has given the same formula along with an "If you have to nest"
IF formula.


--
Kevin Backmann


"Nigel" wrote:

No that doesn't work

"Kevin B" wrote:

Try this:

=IF(OR(C4=0,D4=0),0,C4-D4)

Hope this helps.
--
Kevin Backmann


"Nigel" wrote:

Thius is a stupid question but I cannot for the life of me work it out

the calculation I need is

if C4=0 or if D4 = 0 then 0 else c4-d4



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Nested if

"That doesn't work" wins the prize for the most unhelpful post of the day.

If you had wanted further help, you would have told us what values you had
as your inputs, what result you got from the formula, and what result you
expected, but as you did not give any of that information we can't tell you
what you did wrong.
[Kevin's formula was correct, of course, so if that isn't the right answer
it means you asked the wrong question.]
--
David Biddulph

"Nigel" wrote in message
...
No that doesn't work

"Kevin B" wrote:

Try this:

=IF(OR(C4=0,D4=0),0,C4-D4)

Hope this helps.
--
Kevin Backmann


"Nigel" wrote:

Thius is a stupid question but I cannot for the life of me work it out

the calculation I need is

if C4=0 or if D4 = 0 then 0 else c4-d4



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 141
Default Nested if

Sorry Kevin, my mistake, the value in C4 or D4 is actually a text field
(retreiving from Essbase) so thats why it didn't work its fine now

thanks

"Kevin B" wrote:

Try this:

=IF(OR(C4=0,D4=0),0,C4-D4)

Hope this helps.
--
Kevin Backmann


"Nigel" wrote:

Thius is a stupid question but I cannot for the life of me work it out

the calculation I need is

if C4=0 or if D4 = 0 then 0 else c4-d4

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
nested ifs not enough Vincent Excel Discussion (Misc queries) 1 August 23rd 07 03:58 PM
nested if based on nested if in seperate sheet. how? scouserabbit Excel Worksheet Functions 5 March 2nd 07 04:03 PM
Nested Ifs Amy Excel Worksheet Functions 3 October 9th 06 01:54 AM
nested if Ash Excel Worksheet Functions 1 May 31st 06 09:29 AM
Nested If / And / Or ? Titian Excel Discussion (Misc queries) 4 November 22nd 05 11:16 AM


All times are GMT +1. The time now is 11:44 PM.

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

About Us

"It's about Microsoft Excel"