# Help automating this IF formula to generate estimated cost

#### Arinoum

##### New Member
Hi,
I'm trying to create a pricing calculator that automatically calculates the cost of a service depending on which vendor is used and what service line. Tab one has the calculator and tab two has a list of vendors and their services and different rates for these services. See below example:

TAB ONE: C2&3 is a drop down that pulls from tab two a1:G1 (the vendor names). D2&3 pull from tab two a3:a12 (the turn around time) I want to add a formula on F2 to calculate the cost. Something like If C2 = Lori and D2 = 1 business day then return this formula =(7*amount in E2). Any help is greatly appreciated.

 SERVICE VENDOR TURN AROUND TIME ESTIMATED QTY COST T C

TAB TWO:

### Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

#### afonsomira

##### Board Regular
Hello.

See if is this that you need.

Paste this on range"F2" - `=IFERROR(INDEX('TAB TWO'!A1:G12,MATCH(D2,'TAB TWO'!A1:A12,0),MATCH(C2,'TAB TWO'!B1:G1,0)+1)*E2,0)`

Paste this on range "F3" - `=IFERROR(INDEX('TAB TWO'!A1:G12,MATCH(D3,'TAB TWO'!A1:A12,0),MATCH(C3,'TAB TWO'!B1:G1,0)+2)*E3,0)`

#### Arinoum

##### New Member
Hello.

See if is this that you need.

Paste this on range"F2" - `=IFERROR(INDEX('TAB TWO'!A1:G12,MATCH(D2,'TAB TWO'!A1:A12,0),MATCH(C2,'TAB TWO'!B1:G1,0)+1)*E2,0)`

Paste this on range "F3" - `=IFERROR(INDEX('TAB TWO'!A1:G12,MATCH(D3,'TAB TWO'!A1:A12,0),MATCH(C3,'TAB TWO'!B1:G1,0)+2)*E3,0)`
Thank you so much!!!

Replies
12
Views
315
Replies
7
Views
183
Replies
161
Views
1K
Replies
5
Views
75
Replies
1
Views
81

1,128,157
Messages
5,629,023
Members
416,359
Latest member
Juena

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