# Another IF question.

#### csappington

##### New Member
Hello, I have different prices for each unit that I need to use depending on which Substation Line we are working on. Lets call the lines A, B, C, D, E, F, and G. I would like to enter the Substation Line that I am billing for in the Yellow Box, then those corresponding Substation Line unit prices will fall below next to each unit indicated in blue.

I have messed with the IF formula and the false option is throwing me off.

Basically if E3=A then E4="removal!C3". Then I can drag that down through the worksheet. After I F4 cell E3.
Or if E3=B then E4="removal!D3". Then drag that down too.
Pictures are attached.

Can anyone teach me how to do this? Much appreciated!

#### Attachments

• Excel Q1.JPG
90.4 KB · Views: 3
• Excel Q2.JPG
156.9 KB · Views: 3

### Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

#### Fluff

##### MrExcel MVP, Moderator
Hi & welcome to MrExcel.
Excel Formula:
``=INDEX(Removal!\$C\$3:\$I\$100,MATCH(D4,Removal!\$B\$3:\$B\$100,0),MATCH(E\$3,Removal!\$C\$2:\$I\$2,0))``

#### csappington

##### New Member
Hi & welcome to MrExcel.
Excel Formula:
``=INDEX(Removal!\$C\$3:\$I\$100,MATCH(D4,Removal!\$B\$3:\$B\$100,0),MATCH(E\$3,Removal!\$C\$2:\$I\$2,0))``

That works perfectly! Thank you very much!

#### Fluff

##### MrExcel MVP, Moderator
Will the col D values on sheet1 always be exactly the same as the col B values on Removal?
ie no missing values & in the same order
If so you could use
Excel Formula:
``=FILTER(Removal!\$C\$3:\$I\$100,Removal!\$C\$2:\$I\$2=E3)``

#### csappington

##### New Member
Will the col D values on sheet1 always be exactly the same as the col B values on Removal?
ie no missing values & in the same order
If so you could use
Excel Formula:
``=FILTER(Removal!\$C\$3:\$I\$100,Removal!\$C\$2:\$I\$2=E3)``
They were given to us all in the same order luckily! Thank you again. Great job.

#### Fluff

##### MrExcel MVP, Moderator
Glad to help & thanks for the feedback.

Replies
5
Views
79
Replies
5
Views
153
Replies
1
Views
33
Replies
8
Views
122
Replies
14
Views
450

1,128,107
Messages
5,628,731
Members
416,333
Latest member
Time2Learn

### 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.

### Which adblocker are you using?

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

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