Multiple IF Conditions / Outputs

Jer2224

New Member
Joined
Nov 20, 2009
Messages
39
Afternoon all,

Can anyone help me with this - I've had a hunt around and can't find anything on this so I hope someone can help me.

I have a list of 10 conditions that could be entered into a cell (G210 in this case). What I need to do is to enter into cell AJ210 a formula that checks G210 and returns the result in AJ210, based on what it finds.....e.g:

If G210 = Condition 1, 2 or 3, 4, 5, enter into AJ210 result 1.
or...
If G210 = Condition 6, 7, or 8, enter into AJ210 result 2.
or...
If G210 = Condition 9, or 10, enter into AJ210 result 3.

(I then need to count the resultant conditions, but that's another story....)

I tried to use something along these lines:
=IF(C210="","",IF(OR(G210="Condition 1",G210="Condition 2"),"Result 1","Result 2"),IF(OR(G210="Condition 6",G210="Condition 7",G210="Condition 8"),"Result 3","Result 1"))
...but I get too many arguments error.

Can anyone set me on the correct path?

Many thanks.
Jeremy. :)
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Hi,

You have too many conditions, as the error says.

Can you use a vlookup here instead? Put the range of cell values and required results into a table elsewhere, then use =vlookup to get the required result?

Do a quick search and shout if you need anymore help!

Bob
 
Upvote 0
Afternoon chaps,

Unfortunately, I don't have any extra space or additional sheets to add a table of values because space on this sheet is very tightly controlled by others, otherwise VLOOKUP would definately be the way to go.

Are there any other options for this, or do I need to negotiate with the Information Manager?

Thanks for the replies so far.....
Cheers.
 
Upvote 0
Try including your table as part of the formula like:
=LOOKUP(A4,{1,2,3,4,5,6,7,8,9,10},{"a","b","c","d","e","f","g","h","I","k"})
 
Upvote 0
Or if you want to stick with the conditions, can you use a range? Like 1-4 = x, 5-7 = y, 8-10 = z? That would limit your # of conditions. Like the other say, you're better off to use the lookup functions.
 
Upvote 0
try: =IF(OR(G210=Condition 1,G210=Condition 2,G210=Condition 3,G210=Condition 4,G210=Condition 5),"Result 1",IF(OR(G210=Condition 6,G210=Condition 7,G210=Condition 8),"Result 2",IF(OR(G210=Condition 9,G210=Condition 10),"Result 3","")))
 
Upvote 0
Awesome! My spreadsheet is a thing of beauty - that works a treat. :biggrin:

If I could post it I would.....I used various different combinations of this to get the desired result:

=IF(OR(G210=Condition 1,G210=Condition 2,G210=Condition 3,G210=Condition 4,G210=Condition 5),"Result 1",IF(OR(G210=Condition 6,G210=Condition 7,G210=Condition 8),"Result

2",IF(OR(G210=Condition 9,G210=Condition 10),"Result 3","")))

Many thanks to all those who offered help and support with this one - consider this one answered!

(This forum rules - am now officially Excel guru in the company thanks to you guys and girls!)
 
Upvote 0
Hi, Above example was a good one, but how it works if I have something like below scenario?

I want an If condition where Part A & Part B tax should be calculated based on payment date using > <, I have mentioned tax rates, request someone to help me. Thanks in Advance.

From DateTo DatePart A Tax RatePart B Tax RatePayment DatePayment Amount
01 July 201031 March 20122.57510.31/10/2013200000
01 April 201228 February 20133.0912.3612/1/20151500000
01 March 201331 May 20153.70812.3612/10/2012300000
01 June 201514 November 20154.2143/5/20171400000
15 November 201531 May 20164.3514.512/1/2017200000
01 June 201630 June 20174.515
01 July 201718 October 20181218

<colgroup><col width="123" span="2" style="mso-width-source:userset;mso-width-alt:4498; width:92pt"> <col width="100" style="mso-width-source:userset;mso-width-alt:3657;width:75pt"> <col width="99" style="mso-width-source:userset;mso-width-alt:3620;width:74pt"> <col width="64" style="width:48pt"> <col width="95" style="mso-width-source:userset;mso-width-alt:3474;width:71pt"> <col width="116" style="mso-width-source:userset;mso-width-alt:4242;width:87pt"> </colgroup><tbody>
</tbody>

<tbody>
</tbody>
****** id="cke_pastebin" style="position: absolute; top: 0px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">
I want an If condition where Part A & Part B tax should be calculated based on payment date using > <, I have mentioned tax rates, request someone to help me. Thanks in Advance

<tbody>
</tbody>
</body>
 
Upvote 0

Forum statistics

Threads
1,213,521
Messages
6,114,109
Members
448,548
Latest member
harryls

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