MS Excel coding help

December 22, 2009 at 18:45:26
Specs: Windows XP
need help with this MS Excel coding.

Lets say I have created a database in MS Excel

Table 1: Database
Age Chemical Status Final Ranking
1 1 1 1
2 3 2 2

Table 2: Input
Age Chemical Status Final Ranking
1 1 1 Code???

Basically, I want to write a code that reads the numerical values in Table 1(database) based on the numerical values that I input in table 2.
In the above example: When I input: Age-1, Chemical-1, and Status-1 in table 2, it should automatically read the datebase(table 1), scan through all the cell, and match the right numeric value. In this instance "the final ranking – 1"


See More: MS Excel coding help

Report •

December 23, 2009 at 05:31:54
One possible solution:

Put your Table 1 in B1:E3
Row 1 has your headings, your data starts in Row 2

In A2 enter =B2&D2&E2 which will give you 111

Put Table 2 in B5:D6 (Headings in Row 5, data in Row 6)

The formula to pull the Final Ranking would be:


This will concatenate the 3 pieces of data in Table 2, look that string up in Column A of Table 1 and pull the value from the fourth column of the lookup_array.

You can hide Column A if you want.

Report •
Related Solutions

Ask Question