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

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
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,990
Messages
6,122,625
Members
449,093
Latest member
catterz66

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