Using the "IF" function to get certain information

cgreen

Active Member
Joined
Aug 14, 2002
Messages
291
I'm brain dead today and need some help with an if formula.

I would like for the formula to do the following:
There will be several digits in cell "I2".
If the first 4 digits in cell "I2" is "1109" then put "nozzle-700" in cell "G2"; If the first 4 digits in cell "I2" is "1509" then put "nozzle-701" in cell "G2"; If the first 4 digits in cell "I2" is "1809" then put "nozzle-701c" in cell "G2";
If the first 4 digits in cell "I2" is "140b" then put "nozzle-401" in cell "G2";
If the first 4 digits in cell "I2" is "170b" then put "nozzle-401c" in cell "G2"; If the first 4 digits in cell "I2" is "1301" then put "nozzle-t55" in cell "G2"; If the first 4 digits in cell "I2" is "321-" then put "nozzle-t53" in cell "G2".

Are there to many arguments for this formula to work??
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
If you set up a table, you can do this easily:
Book1
ABCDEFGHI
11109nozzle-700
21509nozzle-701nozzle-401c170b4567
31809nozzle-701c
4140bnozzle-401
5170bnozzle-401c
61301nozzle-t55
7321-nozzle-t53
Sheet1


In this example, the table is in A1:B7. Then the formula in G2 takes the first 4 characters in I2 and searches for that in column A. If it is found, it will return the value in column B for that number.
 
Upvote 0

Forum statistics

Threads
1,203,313
Messages
6,054,696
Members
444,741
Latest member
MCB024

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