Excel Macros Question

minendo

Elite Member
Aug 31, 2001
35,560
22
81
Anybody know how to set up the following situation? I've got 12 categories that all data will fall into. What I need the macro to do is run through a set of If statements to decide what each category is. Column C has the inputted data (heights in my case) and column D will place the heights into one of the 12 categories. Anybody have any ideas?
 

theknight571

Platinum Member
Mar 23, 2001
2,896
2
81
You could use VLOOKUP...

You would need to setup a table somewhere in the worksheet, or on another worksheet in the same workbook that listed in one column the min height in each category, and in the next column the name of that category.

Then use the VLOOKUP(Col C,Table_Range,2) in Col D

- TK