WILD CARDs (?) In Pivot Tables or Better Method.

srmorgan

Board Regular
Joined
Apr 18, 2002
Messages
180
Office Version
  1. 365
Platform
  1. Windows
I have a problem with identifying some fields.
In column R I have a three-digit code (all numeric) but could be converted to text if that provides a better solution.
In column T I have to identify the code as follows:
Using "?" as a wild card.

11? "MAM"
32? "XRAY"
35? "CT"
61? "MRI"
67? "US"
all others "OTH"
Except for
483 "ECHO"
but 484, 485, 486 are "others"

Just not sure if this works better with a lookup or a pivot table and I am stumped about using wild cards.

All ideas are appreciated
Thank you
SRMORGAN
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
S2, copied down:
Rich (BB code):

=IFERROR(LOOKUP(9.99999999999999E+307,
    FIND("|"&{11,32,35,61,67,483},"|"&R2),
   {"MAM","XRAY","CT","MRI","US","ECHO"}),"OTH")
 
Upvote 0
Not an answer, but "philosophically".... When a "numeric" value is a label and not really a value that could be added to another, I always treat as text. In the long run it always seems to happen that an alpha-prefix/suffix will get added and create all kinds of havoc elsewhere.
 
Upvote 0

Forum statistics

Threads
1,203,681
Messages
6,056,706
Members
444,885
Latest member
Mark Prillman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top