LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
TG
 
Posts: n/a
Default proper way to nest AND & OR with IF?

cells a1,b1,c1,d1 have the numbers 1,2,3,4 in them

I want to enter an IF statement that says:

IF (sum of a1 + b1 3 AND the value in c1=3) OR the value in c1 = 4,
show this_val, if not show this_other_val


thats simplifying it,my actual formula is more like:

=IF(AND(M2448-L2448=1,G2448Q2448),OR(A2448P2448),DATEDIF(Q2448 ,G2448,"yd"))

and it shows TRUE, but if I try and get it to show a value such as 1 or
0 I get an error.

Obviously I am missing something here, but I cant see it!

I used to do this in 123 all the time, and I thought the proper syntax
in excel was IF(OR(AND(arg1,arg2),arg3),do_this,or_this) - but that
doesnt work!


all suggestions appreciated!


TIA
 
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



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

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"