# select specific pair number

i have an list of numbers but need to pick an specific
for example

need show all numbers with 09 and show and new sheet same position
98765.xlsx
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
need show all numbers with 09 and show and new sheet same position
I could use a little more detail or a workbook example with your sample data.  Finding/filtering values is common.  I don't understand your output/result requirement.
0
ACCOUNTING ASSISTANTAuthor Commented:
aikimark  thanks for the fas response

Sheet data  have the list
like this
0
ACCOUNTING ASSISTANTAuthor Commented:
after i look for 09

it just keep on the numbers with 09  and that what i need

0
Commented:
So, you want to clear the contents of any cell that does not contain "09"?
0
ACCOUNTING ASSISTANTAuthor Commented:
aikimark  Yes !
0
Commented:
In your example, there are non-empty cells that do not contain "09", such as 079, 019, and 039
0
ACCOUNTING ASSISTANTAuthor Commented:
aikimark

1- i have an list of numbers
2- then i need pick up just the number ( in this sample 09)
3- 09 can be any position of the number like ( 0x9, 09x, x09, 90x, 9x0, x90)

i need be keep in the same positon of the original data in
0
Commented:
Are you always going to select two digits?  If not, how much variance?
0
ACCOUNTING ASSISTANTAuthor Commented:
aikimark
in this situation  i always look for 2 digit
0
Commented:
``````Sub Q_29075122()
Dim oRE As Object
Dim wks As Worksheet
Dim rng As Range
Dim rngCell As Range

Set wks = ActiveSheet

Set oRE = CreateObject("vbscript.regexp")
oRE.Global = False
oRE.Pattern = "0.*9|9.*0"

Set rng = wks.Range(Range("D5"), wks.UsedRange.SpecialCells(xlCellTypeLastCell))
Application.ScreenUpdating = False
For Each rngCell In rng
If oRE.test(rngCell.Value) Then
Else
rngCell.Clear
End If
Next
Application.ScreenUpdating = True
End Sub
``````
0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

ACCOUNTING ASSISTANTAuthor Commented:
aikimark  thanks

can you provide an sample

im not an computer literacy

i  mean i don't know how use the code
0
Commented:
1. Open the VBProject window (Alt+F11)
2. Insert a module in your workbook.
3. Copy/paste the code into the module
4. In the Developer ribbon, Run Macro
5. Select the name of the routine.
0
ACCOUNTING ASSISTANTAuthor Commented:
aikimark thanks

but

is not working
0
Commented:
0
ACCOUNTING ASSISTANTAuthor Commented:
Here is !
98765_A.xlsm
0
Commented:
The routine was missing an End Sub statement.
0
ACCOUNTING ASSISTANTAuthor Commented:
ok but

Im  looking for an more complete solution
like for example

i need a input to enter the data i need look for
then an button to make the look for
0
ACCOUNTING ASSISTANTAuthor Commented:
Thanks ! Expert
0
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.