IF AND/OR statement

onebluekey

New Member
Joined
May 13, 2010
Messages
22
Hi,

I need help in combining these two statements into one with an OR. I am confused as to how to nest the two together in the appropriate sequence.

=IF(AND(G2=city,R2<5000), .15, .06)

=IF(AND(G2=state,R2<5000), .10, .04)

Thank you for any assistance on this!


Lynn
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
If G2 doesn't match City or State, what should the return value be?
 
Upvote 0
You have different results for each criteria ... so I don't think you want an OR, I think you want nested IFs.

=IF(G2=city, IF(R2<5000, .15, .06), IF(G2=state, IF(R2<5000, .10, .04), "YOU NEED SOMETHING HERE IF G2 <> CITY OR STATE"))

If I am misunderstanding something, please try a better explanation.
 
Last edited:
Upvote 0
Thank you both for a quick reply!


@Nogslaw - you got it right! I didn't know what is needed to get the result. The nested IFs is the right one to use!

Thank you for your help! :)


Lynn
 
Upvote 0
Thanks onebluekey ... but don't count HOTPEPPER out of this just yet ... there is a reason he has 14,000+ posts! He may have a more efficient solution for your problem than the nested IFs.
 
Upvote 0

Forum statistics

Threads
1,224,506
Messages
6,179,159
Members
452,892
Latest member
yadavagiri

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top