Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / November 2006

Tip: Looking for answers? Try searching our database.

add OR to already nested If function - help required

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
N E Body - 11 Nov 2006 20:01 GMT
Hi
I have a formula I use 5 times but I want to nest them into one formula but
I cannot get anywhere.

The formulas are

=IF(AND((C3<=F2),(D3>F2)),"on","off")
=IF(AND((C4<=F2),(D4>F2)),"on","off")
=IF(AND((C5<=F2),(D5>F2)),"on","off")
=IF(AND((C6<=F2),(D6>F2)),"on","off")
=IF(AND((C7<=F2),(D7>F2)),"on","off")

By calling the functions A, B,C etc a phonetic description would be

if A or B or C or D or E is true then put "on" otherwise put "off"

Can anyone nest this for me as I have spent a day and got nowhere.

TIA

Kenny
kassie - 11 Nov 2006 20:36 GMT
Not having ctual figures to work on, I'm not sure this is what you want , but
worth a try:
=IF(OR(AND((C3<=F2),(D3>F2)),AND((C4<=F2),(D4>F2)),AND((C5<=F2),(D5>F2)),AND((C6<=F2),(D6>F2)),AND((C7<=F2),(D7>F2))),"on","off")
Of course, all in one formula, no line breaks or spaces.

> Hi
> I have a formula I use 5 times but I want to nest them into one formula but
[quoted text clipped - 17 lines]
>
> Kenny
N E Body - 11 Nov 2006 20:50 GMT
Many thanks kassie, I have tested it and it works exactly as I wanted.

Kind Regards
Kenny

> Not having ctual figures to work on, I'm not sure this is what you want ,
> but
[quoted text clipped - 24 lines]
>>
>> Kenny
Teethless mama - 12 Nov 2006 02:43 GMT
Try this with fewer key strokes

=IF(AND(C3:C7<=F2,D3:D7>=F2),"on","off")
It's an array formula, you have to comit with Ctrl+Shift+Enter (not just
enter)

> Hi
> I have a formula I use 5 times but I want to nest them into one formula but
[quoted text clipped - 17 lines]
>
> Kenny
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.