![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 1
|
I have 15 text items that can be sorted into 6 groups. I want to be able to take a cells text information and assign a value based on which group it is in.
Here is an example. Group1 ->item a ->item b Group 2 ->item c etc what I want to have happen is if a3 contains item c I want group two's value. I hope this makes sense. Thanks in advance |
|
|
|
|
|
#2 |
|
New Member
Join Date: May 2002
Posts: 30
|
|
|
|
|
|
|
#3 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,319
|
Quote:
List would look like this: a 1 b 1 c 2 d 3 e 3 f 4 g 4 h 4 etc. where the second column list the values for the groups the items belong to. Once you have this setup, you ca use: =VLOOKUP(A1,List,2,0) where A1 houses an item to which you want to assign a group value. |
|
|
|
|
|
|
#4 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
If your first data set is in a tabla A1:B3, and your Group-associated values are in another table D1:E2, then you can use the following formula, say in cell G1 to read the desired value
=INDEX(D1:E2,MATCH("Group2",D1:D2,0),2) ... to get ValueGroup2 as presented in the following worksheet simulation:
Click on a hyperlinked cell to see the underlying formula _________________ Yogi Anand Edit: Deleted inactive website from hardcoded signature [ This Message was edited by: Yogi Anand on 2003-01-19 13:00 ] |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|