Archive of Mr Excel Message Board

Back to Forms in Excel VBA archive index
Back to archive home

"IF" with names?
Posted by Dwight on December 07, 2001 6:32 AM
Column A has initials of people assigned to accounts. Each individual is in one of two groups (in future may have more groups, will never have more than 9 individuals in any group). I would like a formula in column B which shows which group the assigned individual is in, eg if "JDR", "RJR" and "TMP" were the members of "Group1" entering "JDR" in cell A3 would make "Group1" appear in B3, and so on.
I think I know how to do nested IF but I think I already have too many names (12 total) and will be adding more in the future. Any ideas?

| Check out our Excel Resources
|
 |
 |
Re: "IF" with names?
Posted by Aladin Akyurek on December 07, 2001 6:43 AM
Hi Dwight,
Create a sheet, name it Admin. In Admin create a 2-column list consisting of:
JDR Group 1
AA Group 2
etc.
select all of the cells of this list and name it eg TEAMS, then use
=VLOOKUP(A1,TEAMS,2,0)
to retrieve the group in B.
Aladin
========

Perfect solution as usual. Thanks, Aladin. NT
Posted by Dwight on December 07, 2001 11:37 AM

This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our
online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.