Reputation: 27
I'm trying to create a program which extract values.
I have a bunch of data tables with specific values:
They are very similar to each other but the difference is the weight (3300 kg and 3500 kg) and altitude (0, 1000 feet and 2000 feet). I don't think I can combine them into one table.
On another sheet I have created 3 dropdown list where you can select temperature, altitude and weight - for example "+15°C, 1000 feet, 3300 kg"
.
What I want to do is to extract the correct value from the correct data table and put it in a cell. For "+15°C, 1000 feet, 3300 kg"
the correct value for CTOD would be 5 for example.
Any friendly soul who can point me in the right direction?
EDIT: I combined all values into one table as commented, see image 2.
Upvotes: 1
Views: 132
Reputation: 11978
If all your data is in a single table, and you have specific parameters to filter and get a CTOD (in your case, those filters would be temperature, weight and Altitude) you can use the formula SUMIFS:
I've duplicated your data in a easy way, ignoring some columns. Then, I did 3 dropwdowns list, where I can choose parameters (temperature
, weight
and Altitude
). Depending on selection, the formula will return one value or another.
As you can see, If I input OAT=+15,
Altitude=1000
and Weight=3300
, formula will return CTOD=5
.
The formula is:
=SUMIFS($D$2:$D$28;$A$2:$A$28;G6;$B$2:$B$28;H6;$C$2:$C$28;I6)
I've uploaded a sample file to my Google Drive. if you want to download it and check the formula by yourself.
https://drive.google.com/open?id=1K7X14MuM84VH-7-nnMzGDfYs9Whjp-8-
Please, note this formula works because every single line is right. I there were duplicates (let's say there is twice the data relative to weight 3300, Temperature +15 and Altitude 1000), then the formula would return CTOD=10
(twice because the duplicate). So be careful with that.
Upvotes: 1