Hi Peanut,
Ready for VBA?
I have data set out like yours and this function gives the Area:
Function Where(State, Areas, List)
State = UCase(State)
cCount = List.Rows.Count
rCount = List.Columns.Count
For MyCol = 1 To rCount
For myRow = 1 To cCount
If State = List(myRow, MyCol) Then
Where = Areas(myRow)
Exit Function
End If
Next myRow
Next MyCol
Where = "Not found"
End Function
Call it with:
=WHERE(Cell_with_single_state, range_with_areas, range_with abbreviations)
Need help with VBA? See David McRitchie's site on "getting started" with VBA
http://www.mvps.org/dmcritchie/excel/getstarted.htm
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email
"Peanut" wrote in message
...
It must be Monday. My brain isn't working this morning.
I have a list of states and the region that they are in. When I have a
customer, I want to simply type in the state and it will automatically
bring
up their correct region. Currently, my region data is by row:
PACIFIC WEST AZ CA HI NM NV
EAST CT DE FL GA
Can you help me come up with the correct value that will return "Pacific
West" when the value of CA is entered?
Thank you,
Peanut