Alternative to If Statement...

fsuguy92

New Member
Joined
Aug 27, 2015
Messages
34
Hey guys, I have a huge excel file that I'm trying to get to run faster and make the file size smaller. There are about 150k rows of data. One formula that I feel is really slowing this thing down is a nested if statement. Can you tell me if there's a more concise formula than the one below? Thank you!!

Code:
=IF(IFERROR(FIND("Air_Force",DUMP!A2),0)>0,"Air Force Falcons",IF(IFERROR(FIND("ASU_Retail",DUMP!A2),0)>0,"Arizona State Sun Devils",IF(IFERROR(FIND("Clemson_Retail",DUMP!A2),0)>0,"Clemson Tigers",IF(IFERROR(FIND("LSU_Retail",DUMP!A2),0)>0,"LSU Tigers",IF(IFERROR(FIND("Navy_Retail",DUMP!A2),0)>0,"Navy Midshipmen",IF(IFERROR(FIND("Oklahoma",DUMP!A2),0)>0,"Oklahoma Sooners",IF(IFERROR(FIND("Ole_Miss_Retail",DUMP!A2),0)>0,"Ole Miss Rebels",IF(IFERROR(FIND("TCU_Retail",DUMP!A2),0)>0,"TCU Horned Frogs",IF(IFERROR(FIND("Colorado_Retail",DUMP!A2),0)>0,"Colorado Buffaloes",IF(IFERROR(FIND("Houston_Retail",DUMP!A2),0)>0,"Houston Cougars",IF(IFERROR(FIND("Nebraska_Retail",DUMP!A2),0)>0,"Nebraska Huskers",IF(IFERROR(FIND("Texas_Retail",DUMP!A2),0)>0,"Texas Longhorns",""))))))))))))
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Hi

Try building an auxilliary table with the strings and use VLOOKUP().
Not only will it be quicker but also simpler to understand and modify.
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

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