Find result in Data Table by multiple conditions

AlexinJap

New Member
Joined
Jan 27, 2022
Messages
4
Office Version
  1. 2021
Platform
  1. MacOS
Hello I am new here.
I've got way too difficult task for my current skills, dear members I appreciate any help or guidance.

Needs to find data in table based on 5 conditions to show it in "Required power" cell.
I have added conditions manually via Data Validation.
Screen.png
My data sheet structure conditions are:
Condition 1 is material thickness (100mm,75mm)
Condition 2 Outside temperature (43, 35,...)
Condition 3 Desirable temperature inside (15, 10, 5, 0)
Condition 4,5 warehouse size (I think here I can use VLOOKUP + HLOOKUP.)

sheet2.jpg
Only the final search step is clear for me, but I don't know how to get to that point.

Can't even think how to start.
IF material thickness 100mm search on the left table, IF 75mm search in range on the right table,
Then I need to come to Outside temperature condition and so on, until finally I can search by matching via VLOOKUP and HLOOKUP.

Cooling power.xlsx
ABCDEF
3
4
5Warehouse size15
6Warehouse height2.2m
7Panel thickness75mm
8Outside air temp.
9Desirable Internal temp.
10
11TODOHow to? ->Required powerkw
12
13
14
Calculation form
Cells with Data Validation
CellAllowCriteria
D5List=Data!$F$6:$K$6
D6List=Data!$D$7:$D$9
D7List100,75
D8List43,35
D9List15,10,5,0



Cooling power.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXY
1Cond.1
2
3100㎜ Urethane75㎜ Urethane
4Cond. 3Cond. 4 warehouse size
5Outside temp.Desir. Internal Temp.Warehouse heightWarehouse size ㎡Outside temp.Desir. Internal Temp.Warehouse heightWarehouse size ㎡
65.010.015.020.025.030.035.05.010.015.020.025.030.035.0
743℃152.21.452.343.123.894.75.546.1543℃152.21.542.483.294.084.925.86.43
82.51.512.443.364.265.275.996.912.51.62.573.534.635.56.267.21
931.762.873.865.075.986.978.0531.863.014.055.296.237.268.37
10102.21.782.974.055.276.27.348.23102.21.893.144.265.526.497.688.61
112.51.873.134.555.86.988.029.282.51.993.314.786.077.298.389.68
12Cond. 232.193.75.266.718.029.4110.932.323.95.517.018.369.811.83
1352.22.13.595.126.477.689.1310.352.22.233.85.396.798.059.5510.77
142.52.223.825.587.168.6710.0411.82.52.364.035.867.59.0610.4812.3
1532.614.696.498.3410.041213.8932.784.946.88.7110.4612.4814.44
1602.22.414.26.027.669.1610.912.5102.22.574.616.348.059.611.4113.08
172.52.574.666.598.5110.3612.2114.152.52.744.926.938.9210.8212.7414.75
1833.035.517.79.9612.2214.4116.7133.235.88.0710.412.7214.9917.36
19Outside temp.Desir. Internal Temp.Warehouse heightWarehouse size ㎡Outside temp.Desir. Internal Temp.Warehouse heightWarehouse size ㎡
205.010.015.020.025.030.035.05.010.015.020.025.030.035.0
2135℃152.21.171.922.63.283.894.775.3635℃152.21.242.022.743.444.074.985.6
222.51.242.042.833.624.545.236.032.51.312.142.973.794.745.456.28
2331.432.393.294.215.236.137.0731.512.513.444.565.446.377.35
24102.21.52.543.524.665.556.577.44102.21.592.693.714.885.816.877.77
252.51.62.733.875.166.257.268.42.51.692.884.065.46.537.578.76
2631.863.234.696.027.278.579.9231.983.44.96.287.568.9110.31
2752.21.813.164.595.867.038.369.5152.21.933.344.836.147.368.749.93
282.51.953.425.056.527.959.2810.762.52.073.615.36.828.39.6811.21
2932.294.065.917.659.2910.9912.9132.434.276.197.989.6711.4213.41
3002.22.133.775.57.058.5110.1311.7202.22.273.995.797.48.9110.612.25
312.52.34.16.077.889.6311.2913.272.52.444.336.378.2410.0611.9413.82
3232.715.047.139.2711.313.5615.7332.885.37.479.6711.9314.116.34
33
Data
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Hi AlexinJap,

Merged cells are anathema to Excel formulae and what looks easier to the human eye (e.g. splitting 100mm and 75mm Urethane into separate tables) adds complexity to a formula solution.

I am reformatting your tables but before I suggest the calculation I must ask the question: Will the specified values entered on the Calculation Form always be exact matches or does it need to be the next highest? (e.g. Outside Temp is 40 so assume 43, Desired Internal Temp is 7 so assume 10, Warehouse Size is 28 sq metres so assume 30).
 
Upvote 0
Hello Toadstool. Thank you for your time. Yes, the user must select temperature, warehouse size, etc, there is no input options outside of those in Data Validation selection.
It is pity that I couldn't attach the Excel here.

I could get the answer with the formula :
Excel Formula:
=INDEX(INDIRECT("U_" &$D$7),MATCH($D$8,Data!$B$7:$B$32,0)+MATCH($D$6,Data!$D$7:$D$32,0)+MATCH($D$9,Data!$C$7:$C$32,0)-2,MATCH($D$5,Data!$F$6:$L$6,0))

The data table had to be modified where ℃ was removed and only number left. And also named ranges were created for different material thickness U_100, U_75, etc. So now having much bigger table with different temperatures
 
Upvote 0
the green cells, you should change to your values, best with data-validation, the orange cell is the result
Map2
ZAAABACADAEAFAGAH
4
5offset $A$1not necessary
6rowcolumncheckindirect
7material75㎜ Urethane314$N$375㎜ Urethane
8outside35℃2114$N$2135℃
9internal52715$O$275
10height2.52816$P$282.5
11size352024$X$2035
12value11.212824$X$2811.21
13
14
Blad1
Cell Formulas
RangeFormula
AD7AD7=MATCH(AB7,OFFSET($A$1,AC7-1,,,26),0)
AF7:AF12AF7=ADDRESS(AC7,AD7)
AG7:AG12AG7=INDIRECT(AF7)
AC8AC8=MATCH(AB8,OFFSET($A$1,,AD8-1,100,),0)
AD8,AD12AD8=+AD7
AC9AC9=+AC8-1+MATCH(AB9,OFFSET($A$1,AC8-1,AD9-1,14,),0)
AD9:AD10AD9=+AD8+1
AC10AC10=AC9+MATCH(AB10,OFFSET($A$1,AC9-1,AD10-1,5,),0)-1
AC11AC11=+AC8-1
AD11AD11=AD7-1+MATCH(AB11,OFFSET($A$1,AC8-2,AD7-1,,15),0)
AB12AB12=OFFSET($A$1,AC12-1,AD12-1,,)
AC12AC12=+AC10
Cells with Conditional Formatting
CellConditionCell FormatStop If True
AG7:AG12Expression=AB7<>AG7textNO


example file
 
Upvote 0
Reformatting the Data sheet makes the formula much simpler.

AlexinJap.xlsx
ABCDEFGHIJK
1Urethane Thickness mmOutside temp. in ℃Desir. Internal Temp.Warehouse heightWarehouse size ㎡
25101520253035
310043152.21.452.343.123.894.75.546.15
410043152.51.512.443.364.265.275.996.91
5100431531.762.873.865.075.986.978.05
610043102.21.782.974.055.276.27.348.23
710043102.51.873.134.555.86.988.029.28
8100431032.193.75.266.718.029.4110.9
91004352.22.13.595.126.477.689.1310.3
101004352.52.223.825.587.168.6710.0411.8
1110043532.614.696.498.3410.041213.89
121004302.22.414.26.027.669.1610.912.51
131004302.52.574.666.598.5110.3612.2114.15
1410043033.035.517.79.9612.2214.4116.71
1510035152.21.171.922.63.283.894.775.36
1610035152.51.242.042.833.624.545.236.03
17100351531.432.393.294.215.236.137.07
1810035102.21.52.543.524.665.556.577.44
1910035102.51.62.733.875.166.257.268.4
20100351031.863.234.696.027.278.579.92
211003552.21.813.164.595.867.038.369.51
221003552.51.953.425.056.527.959.2810.76
2310035532.294.065.917.659.2910.9912.91
241003502.22.133.775.57.058.5110.1311.72
251003502.52.34.16.077.889.6311.2913.27
2610035032.715.047.139.2711.313.5615.73
277543152.21.542.483.294.084.925.86.43
287543152.51.62.573.534.635.56.267.21
2975431531.863.014.055.296.237.268.37
307543102.21.893.144.265.526.497.688.61
317543102.51.993.314.786.077.298.389.68
3275431032.323.95.517.018.369.811.83
33754352.22.233.85.396.798.059.5510.77
34754352.52.364.035.867.59.0610.4812.3
357543532.784.946.88.7110.4612.4814.44
36754302.22.574.616.348.059.611.4113.08
37754302.52.744.926.938.9210.8212.7414.75
387543033.235.88.0710.412.7214.9917.36
397535152.21.242.022.743.444.074.985.6
407535152.51.312.142.973.794.745.456.28
4175351531.512.513.444.565.446.377.35
427535102.21.592.693.714.885.816.877.77
437535102.51.692.884.065.46.537.578.76
4475351031.983.44.96.287.568.9110.31
45753552.21.933.344.836.147.368.749.93
46753552.52.073.615.36.828.39.6811.21
477535532.434.276.197.989.6711.4213.41
48753502.22.273.995.797.48.9110.612.25
49753502.52.444.336.378.2410.0611.9413.82
507535032.885.37.479.6711.9314.116.34
51
Data


AlexinJap.xlsx
ABCDE
1
2
3
4
5Warehouse size15
6Warehouse height2.2m
7Panel thickness75mm
8Outside air temp.35
9Desirable Internal temp.10
10
11Required power3.71kw
12
13
14
Calculation Form
Cell Formulas
RangeFormula
C11C11=INDEX(Data!$E$3:$K$9999,AGGREGATE(15,6,ROW(Data!$A$3:$A$9999)-ROW(Data!$A$2)/((Data!$B$3:$B$9999=$C$8)*(Data!$C$3:$C$9999=$C$9)*(Data!$A$3:$A$50=$C$7)*(Data!$D$3:$D$9999=$C$6)),1),MATCH($C$5,Data!$E$2:$K$2,0))
Cells with Data Validation
CellAllowCriteria
C5List=Data!$E$2:$K$2
C6List=Data!$D$3:$D$5
C7List75,100
C8List35,43
C9List0,5,10,15
 
Upvote 0
Solution
Toadstool, Thank you very much, yes indeed reformatting data sheet would make it simpler for formula. But I was not given that option as those who manage the data sheet still want it to look pleasant for human eye and even print out if needs.
So I went with the solution provided by JohnTopley: Find result in Data Table by multiple conditions [SOLVED]
Excel Formula:
=INDEX(INDIRECT("U_" &$D$7),MATCH($D$8,Data!$B$7:$B$32,0)+MATCH($D$6,Data!$D$7:$D$32,0)+MATCH($D$9,Data!$C$7:$C$32,0)-2,MATCH($D$5,Data!$F$6:$L$6,0))
 
Last edited by a moderator:
Upvote 0
Welcome to the MrExcel Message Board!

For future reference.
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,809
Members
449,048
Latest member
greyangel23

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