Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi-
I am trying to search for the first 3 characters of a list of part numbers. The part numbers I am trying to filter out start with the same 3 letters, but the next 4 numbers in the part number could be anything (ex. "ABC1234", "ABC2345"). How can I search the cells for anything containing those first three letters? -Melissa |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try an AutoFilter:
Select your range of part numbers (I'm assuming the top cell has a title like: PartNum) Then...From the Excel Main Menu: <data<filter<autofilter Click on the PartNum heading drop-down Select: Custom Settings: Begins with: ABC Click [OK] That will hide all PartNum rows where the PartNum does NOT begin with "ABC" Is that something you can work with? Post back if you have more questions. -------------------------- Regards, Ron (XL2003, Win XP) Microsoft MVP (Excel) "Melissa" wrote in message ups.com... Hi- I am trying to search for the first 3 characters of a list of part numbers. The part numbers I am trying to filter out start with the same 3 letters, but the next 4 numbers in the part number could be anything (ex. "ABC1234", "ABC2345"). How can I search the cells for anything containing those first three letters? -Melissa |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Nov 13, 10:37 am, "Ron Coderre"
wrote: Try an AutoFilter: Select your range of part numbers (I'm assuming the top cell has a title like: PartNum) Then...From the Excel Main Menu: <data<filter<autofilter Click on the PartNum heading drop-down Select: Custom Settings: Begins with: ABC Click [OK] That will hide all PartNum rows where the PartNum does NOT begin with "ABC" Is that something you can work with? Post back if you have more questions. -------------------------- Regards, Ron (XL2003, Win XP) Microsoft MVP (Excel) "Melissa" wrote in message ups.com... Hi- I am trying to search for the first 3 characters of a list of part numbers. The part numbers I am trying to filter out start with the same 3 letters, but the next 4 numbers in the part number could be anything (ex. "ABC1234", "ABC2345"). How can I search the cells for anything containing those first three letters? -Melissa Thanks for the quick response. I do not want to just use a filter because when the program finds the part number, it grabs all the other part numbers from that sales order and puts them in another worksheet. Any other suggestions? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You trying to do this with VBA? If so, the code below will filter the
used range where column B starts with ABC. ActiveSheet.UsedRange.AutoFilter _ Field:=2, Criteria1:="ABC*" Melissa wrote: Hi- I am trying to search for the first 3 characters of a list of part numbers. The part numbers I am trying to filter out start with the same 3 letters, but the next 4 numbers in the part number could be anything (ex. "ABC1234", "ABC2345"). How can I search the cells for anything containing those first three letters? -Melissa |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Nov 13, 10:42 am, JW wrote:
You trying to do this with VBA? If so, the code below will filter the used range where column B starts with ABC. ActiveSheet.UsedRange.AutoFilter _ Field:=2, Criteria1:="ABC*" Melissa wrote: Hi- I am trying to search for the first 3 characters of a list of part numbers. The part numbers I am trying to filter out start with the same 3 letters, but the next 4 numbers in the part number could be anything (ex. "ABC1234", "ABC2345"). How can I search the cells for anything containing those first three letters? -Melissa I just used this code: If Cells(r, 2).Value Like "ABC*" Then It worked. Thanks for your help! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
what are the regular expression special characters while searching | Excel Discussion (Misc queries) | |||
Searching Uppercase characters | Excel Discussion (Misc queries) | |||
Searching for Alphabetical Characters | Excel Programming | |||
Formulas dealing with searching for characters | Excel Worksheet Functions | |||
searching for the first few characters in an active cell | Excel Programming |