Use multiple data validation lists to find a price in grid

matigras

New Member
Joined
Mar 7, 2018
Messages
1
Datasheet

ABC
1MorningWeekdaySpring
2NightWeekendSummer
3Fall
4Winter

<tbody>
</tbody>

Gridsheet
ABCDE
1MorningNight
2WeekdayWeekendWeekdayWeekend
3Spring$100$150$200$250
4Summer$300$350$400$450
5Fall$500$550$600$650
6Winter$700$750$800$850

<tbody>
</tbody>


Worksheet
ABCD
1Time of DayTime of WeekSeasonRate
2
3

<tbody>
</tbody>


Data Validation:

Worksheet!A2
  • Data Validation > List > =Datasheet!$A$1:$A$2

Worksheet!B2
  • Data Validation > List > =Datasheet!$B$1:$B$2

Worksheet!C2
  • Data Validation > List > =Datasheet!$C$1:$C$4

Function:

D2 in Worksheet equals "VALUE" based on "Data Validation List" selections in columns A, B, and C as defined in Gridsheet

Examples:

If (Worksheet!A1=Morning) and (Worksheet!B1=Weekend) and (Worksheet!C1=Fall) then Worksheet!D2=$550

If (Worksheet!A1=Night) and (Worksheet!B1=Weekday) and (Worksheet!C1=Summer) then Worksheet!D2=$400


I tried many SUMIF, SUMIFS, IF(AND) functions and can't get this to work.Thanks for looking... helping!
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
fallMorningWeekend
weekendbecomesFall
morning
rate$550######
col H
MorningMorningNightNightMorningWeekdayMorningWeekendNightWeekdayNightWeekendrow 11
WeekdayWeekendWeekdayWeekendSpring$100$150$200$250
Spring$100$150$200$250Summer$300$350$400$450
Summer$300$350$400$450Fall$500$550$600$650
Fall$500$550$600$650Winter$700$750$800$850
Winter$700$750$800$850
###
formula returning $550
=OFFSET($H$11,MATCH(I2,$H$12:$H$15,0),MATCH($I$1,$I$11:$L$11,0))

<colgroup><col span="8"><col><col><col><col><col span="4"></colgroup><tbody>
</tbody>
 
Upvote 0
Hi,

Is the layout of your data something fixed, that has to be as you described? Sometimes the easiest solution, is to change the layout of your data.
For example: Instead of having the lookup the with multiple layers, it could be much easier to use a more tabular layout as follows:
SeasonTime of WeekTime of DayRate
SpringWeekdayMorning100
SummerWeekdayMorning300
FallWeekdayMorning500
WinterWeekdayMorning700
SpringWeekendMorning150
SummerWeekendMorning350
FallWeekendMorning550
WinterWeekendMorning750
SpringWeekdayNight200
SummerWeekdayNight400
FallWeekdayNight600
WinterWeekdayNight800
SpringWeekendNight250
SummerWeekendNight450
FallWeekendNight650
WinterWeekendNight850

<tbody>
</tbody>

Then as formula you could use:

=SUMIFS( Table1[Rate];
Table1[Time of Day]; C2;
Table1[Time of Week]; B2;
Table1[Season]; A2)

or

=SUMPRODUCT( (Table1[Rate] ) *
(Table1[Season] = A2 ) *
(Table1[Time of Week] = B2 ) *
(Table1[Time of Day] = C2 ))

Would that help you?

Regards,
Rick
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,818
Members
449,049
Latest member
cybersurfer5000

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