formula help

smpaz7467

Board Regular
Joined
Sep 18, 2006
Messages
77
I need help on a formula. I have my data in the following columns....


d2
250

e2
10

f2
1

g2
LV,LVP,CL,FD,REV

H2
Total




Now in G2 the commas are what could be in the cell. Its only going to be one of the items but the formulas to calc the totals are different for each.


Now for the formulas....

LV=d2*10+e2*10+f2*65
LVP=d2*13+e2*10+f2*65
CL=d2*20+e2*20+f2*65
FD=d2*5+e2*5+f2*65
REV=f2*65

Now what I am looking for is for these formulas to be in H2, and when I put in either LV or LVP ect. into G2 it will figure out my totals for me.


Any help would be appreciated... Thanks in advance
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Domenic

MrExcel MVP
Joined
Mar 10, 2004
Messages
19,696
Try...

=CHOOSE(MATCH(G2,{"LV","LVP","CL","FD","REV"},0),D2*10+E2*10+F2*65,D2*13+E2*10+F2*65,D2*20+E2*20+F2*65,D2*5+E2*5+F2*65,F2*65)

Hope this helps!
 

Forum statistics

Threads
1,136,267
Messages
5,674,730
Members
419,523
Latest member
Urnovio

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
Top