Large IF Statement with multiple logical test

ccamp88

New Member
Joined
Aug 26, 2021
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am having a hard time with continuing to add onto this formula with multiple logical test. In my screenshot attached you will see in Cell M5 I have the following IF statement:
IF(OR(C5="General Surgery Volume",C5="GYN Volume"),IF(AND(L5>=0,L5<3),"<3",IF(AND(L5>=3,L5<6),"3 - 5",IF(AND(L5>=6,L5<11),"6 - 10",IF(AND(L5>=11,L5<15),"11 - 14",IF(L5>=15,"15+",""))))))

Which works perfectly if anything in Column C is General Surgery Volume or GYN volume. My question is how to I add onto this formula where as if something in column C is Ortho Volume or Cardiology volume it will return a different value? Below I have posted the IF statement that would apply to Ortho or Cardiology volume:
IF(OR(C5="Ortho Volume",C5="Cardiology Volume"),IF(AND(L5>=0,L5<5),"<5",IF(AND(L5>=5,L5<11),"5 - 10",IF(AND(L5>=11,L5<16),"11 - 15",IF(AND(L5>=16,L5<21),"16 - 20",IF(L5>=21,"21+",""))))))

my question is how do I combine these two statement together without it producing an error? If these statements are run separately I have no problem but whenever I go to combine them so that the value is dictated based on what column C is show I get a formula error. Please help I am having such a hard time finding a solution for this
 

Attachments

  • IF Statement question.png
    IF Statement question.png
    70.1 KB · Views: 10
Eric, when I copy the data to my sheet, I get "3-5" captured in the date format as 3/5/2021. Using ' before "3-5" is the only option to stop it from getting converted to date?
 
Upvote 0

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Yes, that is somewhat annoying. You can also format the cell as Text before entering the "3-5" value.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

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