Specific Calculation

mrkris1982

Active Member
Joined
Apr 16, 2009
Messages
407
Column J is # of Days
Column M is a validation list that have about 6 options; one of those is CAB
Column Q is multiplying the # of days by the $ amount associated with CAB via a lookup on another sheet
HTML:
=IFERROR(VLOOKUP(M53,'Valid Values'!$F$2:$G$7,2,FALSE)*[@[No. Of Attendees]]*[@['# of Days]],"")


Problem is, if 3 or more days is selected in J AND Cab is selected in M, I want the calculation in Q to multiply by 2 days (ie, no more than 2 days of taking a cab)

Here is the full chart of options and costs:

Travel
Means
Travel Means Costs
Rental Car65
Pool Car55
Train45
Cab40
Other50
No0

<colgroup><col><col></colgroup><tbody>
</tbody>

Whats the most efficient way to achieve this?
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Try this to get the number of days

=IFERROR(VLOOKUP(M53,'Valid Values'!$F$2:$G$7,2,FALSE)*[@[No. Of Attendees]]*MIN(2,[@['# of Days]]),"")
 
Last edited:
Upvote 0
If 2 day restriction only applies when M53 = CAB

=IFERROR(VLOOKUP(M53,'Valid Values'!$F$2:$G$7,2,FALSE)*[@[No. Of Attendees]]*IF(M53="CAB",MIN(2,[@['# of Days]]),[@['# of Days]]),"")
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,478
Members
448,967
Latest member
visheshkotha

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