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

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
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,215,326
Messages
6,124,258
Members
449,149
Latest member
mwdbActuary

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