View Single Post
  #4  
Old April 22nd, 2010, 04:55 PM posted to microsoft.public.excel.worksheet.functions
Demosthenes
external usenet poster
 
Posts: 35
Default Categorizing Data Question

Pete,

Thanks! That does what I wanted.

Max,

Thanks! That works, but I was hoping to not reformat it like that.

"Max" wrote:

Think you could simplify the categorization task dramatically via
pre-populating fully cols A and B (fill-it down), viz make it:

Fruit apple
Fruit orange
Fruit banana
Fruit kiwi
Fruit tomato
Veg lettuce
Veg potato

Then simply place in D2, copied down: =INDEX(A:A,MATCH(C2,B:B,0))
should accomplish the task of categorizing all the data in col C in seconds
Above of any worth? hit YES below
--
Max
Singapore
---
"Demosthenes" wrote:
I have a list of data in C, and would like to create a column in D that
organizes that data into a specific category. For example, given:

Fruit apple apple
orange orange
banana lettuce
kiwi banana
tomato kiwi
Veg lettuce potato
potato orange
banana
kiwi
tomato
apple
orange

I want to create a new column in D that returns "fruit" or "veg" -
whichever's appropriate for that row. The problem is that I have a lot of
items and a lot of categories. I can't get an IF or LOOKUP function to work.
I can do VLOOKUP, but would rather not reformat my data.

Any thoughts? Thanks!