EXAMPLE.xls | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | |||
1 | ||||||||||||||||
2 | ||||||||||||||||
3 | SALESSTATS:0.01-0.5011-10-2007 | SALESANALYSIS(HEADOFFICE) | ||||||||||||||
4 | GOOD | MEDIUM | POOR | STAT | COLOUR | QUALITY | VALUE | |||||||||
5 | RED | 8.5 | 7.4 | 6.1 | 0.05 | RED | GOOD | 8.5 | ||||||||
6 | ORANGE | 7.4 | 6.6 | 5.5 | 51.89 | RED | POOR | |||||||||
7 | GREEN | 6.7 | 6 | 5 | 100.02 | GREEN | GOOD | |||||||||
8 | 150 | ORANGE | MEDIUM | |||||||||||||
9 | SALESSTATS:0.51-1.0011-10-2007 | |||||||||||||||
10 | GOOD | MEDIUM | POOR | |||||||||||||
11 | RED | 11.3 | 9.8 | 8.2 | ||||||||||||
12 | ORANGE | 10.2 | 8.4 | 7.3 | ||||||||||||
13 | GREEN | 9 | 7.2 | 6.5 | ||||||||||||
14 | ||||||||||||||||
15 | SHEET1 | SHEET2 | ||||||||||||||
16 | ||||||||||||||||
Sheet1 |
The above represents two worksheets I am using, in one excel workbook.
On sheet 2, in the value column, I want to (somehow) grab the corresponding value from sheet 1.
eg. (the first line on sheet 2) I want to find the value, where stat is 0.05, colour is RED & quality is GOOD.
On sheet 1, this number is found in the cell D5 (highlighted pink)
In a simple world, in my answer cell, I would manually type '=sheet1!D5' and do the same for all the values I'm looking for, but the document above is simplified. The actual sales stats sheet is massive (71,380 rows of figures), hence I don’t want to spend the next millenia manually clicking.
Is there something I can do to automate this? I've considered a macro, but I don’t think that’s 'do-able' because (to me) it seems more like something one would use SQL for, not a 'copy what I do' macro.
I'm not an SQL programmer by any means but I reckon (in simple language) it would read like this; (by the way, I'm not asking for an SQL answer, I know excel must be able to do this with formulas)
[TYPED in cell L5 (where I want the answer displayed)]
FIND table in SHEET 1, where table title (C3) contains the value in cell I5 (ie; 0.05 is within 0.01 - 0.50)
FIND ROW in that table where colour (the first cell along) matches the value in cell J5
FIND COLUMN in that table where quality (the top cell in that table) matches the value in cell K5
WHERE the ROW and COLUMN above cross each other (CELL D5), take that value and put is in cell L5
Hope I've made it simple. Hope you can help.
Thanks Everyone.