Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Searching for first 3 characters

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,118
Default Searching for first 3 characters

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Searching for first 3 characters

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 638
Default Searching for first 3 characters

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Searching for first 3 characters

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
what are the regular expression special characters while searching Howdy Excel Discussion (Misc queries) 3 January 18th 10 02:04 PM
Searching Uppercase characters Shams Excel Discussion (Misc queries) 3 July 15th 09 02:20 PM
Searching for Alphabetical Characters Neily[_3_] Excel Programming 3 October 24th 06 12:04 PM
Formulas dealing with searching for characters Electro7 Excel Worksheet Functions 3 February 17th 06 12:38 AM
searching for the first few characters in an active cell Chris Excel Programming 1 June 17th 04 10:27 PM


All times are GMT +1. The time now is 07:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"