#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Nested IFs

I am using nested IFs to determine the number of days between two events. If
the two events occurred on the same day, how do I return a 1 instead of 0 and
not affect the calculation for other date ranges?

The current statement is

=IF(O29="Void","Void",IF(O29="Spare","Spare",IF(O2 9="Open","Open",IF(O29="Closed",N29-D29," "))))

where n29 is date opened and d29 is date closed and o29 is the status
Thanks
--
Larry
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,358
Default Nested IFs

=IF(O29="Void","Void",IF(O29="Spare","Spare",IF(O2 9="Open","Open",IF(O29="Closed",MIN(N29-D29,1)," "))))

Hope this helps.
--
John C


"lwilliams" wrote:

I am using nested IFs to determine the number of days between two events. If
the two events occurred on the same day, how do I return a 1 instead of 0 and
not affect the calculation for other date ranges?

The current statement is

=IF(O29="Void","Void",IF(O29="Spare","Spare",IF(O2 9="Open","Open",IF(O29="Closed",N29-D29," "))))

where n29 is date opened and d29 is date closed and o29 is the status
Thanks
--
Larry

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,358
Default Nested IFs

You could get rid of some of the nested IFs as well, by the following:
=IF(OR(O29="Void",O29="Spare",O29="Open"),O29,IF(O 29="Closed",MIN(N29-D29,1)," ",))))



--
John C


"lwilliams" wrote:

I am using nested IFs to determine the number of days between two events. If
the two events occurred on the same day, how do I return a 1 instead of 0 and
not affect the calculation for other date ranges?

The current statement is

=IF(O29="Void","Void",IF(O29="Spare","Spare",IF(O2 9="Open","Open",IF(O29="Closed",N29-D29," "))))

where n29 is date opened and d29 is date closed and o29 is the status
Thanks
--
Larry

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Nested IFs

Wow, I really like the second statement. I guess you can tell I'm only a
hack at this. Thanks for the help.
--
Larry


"John C" wrote:

You could get rid of some of the nested IFs as well, by the following:
=IF(OR(O29="Void",O29="Spare",O29="Open"),O29,IF(O 29="Closed",MIN(N29-D29,1)," ",))))



--
John C


"lwilliams" wrote:

I am using nested IFs to determine the number of days between two events. If
the two events occurred on the same day, how do I return a 1 instead of 0 and
not affect the calculation for other date ranges?

The current statement is

=IF(O29="Void","Void",IF(O29="Spare","Spare",IF(O2 9="Open","Open",IF(O29="Closed",N29-D29," "))))

where n29 is date opened and d29 is date closed and o29 is the status
Thanks
--
Larry

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,358
Default Nested IFs

We all are, thanks for the feedback.
--
John C


"lwilliams" wrote:

Wow, I really like the second statement. I guess you can tell I'm only a
hack at this. Thanks for the help.
--
Larry


"John C" wrote:

You could get rid of some of the nested IFs as well, by the following:
=IF(OR(O29="Void",O29="Spare",O29="Open"),O29,IF(O 29="Closed",MIN(N29-D29,1)," ",))))



--
John C


"lwilliams" wrote:

I am using nested IFs to determine the number of days between two events. If
the two events occurred on the same day, how do I return a 1 instead of 0 and
not affect the calculation for other date ranges?

The current statement is

=IF(O29="Void","Void",IF(O29="Spare","Spare",IF(O2 9="Open","Open",IF(O29="Closed",N29-D29," "))))

where n29 is date opened and d29 is date closed and o29 is the status
Thanks
--
Larry



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Nested IFs

You have two too many of these ")"
the formula can be reduce further

=IF(OR(O29={"Void","Spare","Open"}),O29,IF(O29="Cl osed",MIN(N29-D29,1)," ",))


"John C" wrote:

You could get rid of some of the nested IFs as well, by the following:
=IF(OR(O29="Void",O29="Spare",O29="Open"),O29,IF(O 29="Closed",MIN(N29-D29,1)," ",))))



--
John C


"lwilliams" wrote:

I am using nested IFs to determine the number of days between two events. If
the two events occurred on the same day, how do I return a 1 instead of 0 and
not affect the calculation for other date ranges?

The current statement is

=IF(O29="Void","Void",IF(O29="Spare","Spare",IF(O2 9="Open","Open",IF(O29="Closed",N29-D29," "))))

where n29 is date opened and d29 is date closed and o29 is the status
Thanks
--
Larry

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,358
Default Nested IFs

Whew! Saved 5 characters there. Nevermind the crux of it is eliminating as
many IF statements as possible, I guess those extra 5 characters will give me
time to do my taxes, get my laundry done, and feed the cats.
--
John C


"Teethless mama" wrote:

You have two too many of these ")"
the formula can be reduce further

=IF(OR(O29={"Void","Spare","Open"}),O29,IF(O29="Cl osed",MIN(N29-D29,1)," ",))


"John C" wrote:

You could get rid of some of the nested IFs as well, by the following:
=IF(OR(O29="Void",O29="Spare",O29="Open"),O29,IF(O 29="Closed",MIN(N29-D29,1)," ",))))



--
John C


"lwilliams" wrote:

I am using nested IFs to determine the number of days between two events. If
the two events occurred on the same day, how do I return a 1 instead of 0 and
not affect the calculation for other date ranges?

The current statement is

=IF(O29="Void","Void",IF(O29="Spare","Spare",IF(O2 9="Open","Open",IF(O29="Closed",N29-D29," "))))

where n29 is date opened and d29 is date closed and o29 is the status
Thanks
--
Larry

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 If help JoeA2006 Excel Worksheet Functions 2 January 4th 07 04:08 PM
using nested OR stef Excel Worksheet Functions 18 November 3rd 06 09:35 PM
Nested IF James Hamilton Excel Discussion (Misc queries) 12 September 30th 05 03:43 PM


All times are GMT +1. The time now is 10:18 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"