LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Categorizing Data Question

Put this in D1:

=IF(ISNA(MATCH(C1,B:B,0)),"",IF(INDEX(A:A,MATCH(C1 ,B:B,
0))="",LOOKUP("zzz",INDIRECT("A1:A"&MATCH(C1,B:B,
0))),INDEX(A:A,MATCH(C1,B:B,0))))

and copy down as far as you need. It will cope with column C cells
being empty and with cells in C containing fruit or vegetables which
are not in column B (eg Plum) - both return blanks.

Hope this helps.

Pete

On Apr 21, 10:43*pm, Demosthenes
wrote:
Hello,

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!


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Searching for products and categorizing. Nicholas1 Excel Worksheet Functions 2 October 28th 09 04:44 PM
Categorizing Comments SoBe Excel Discussion (Misc queries) 0 October 18th 07 08:54 PM
Categorizing an excel column Anna Excel Discussion (Misc queries) 2 July 15th 05 07:32 AM
time formatting and time categorizing (vlookup or data validation) MarianneR Excel Worksheet Functions 4 November 18th 04 03:24 PM
time formatting and time categorizing (vlookup or data validation) MarianneR Excel Worksheet Functions 0 November 18th 04 03:13 PM


All times are GMT +1. The time now is 08:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"