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
ADRIANA PACCOUNTING ASSISTANTAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

aikimarkCommented:
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
ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
aikimark  thanks for the fas response

Sheet data  have the list
like this
12.PNG
0
ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
after i look for 09

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

234.PNG
0
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

aikimarkCommented:
So, you want to clear the contents of any cell that does not contain "09"?
0
ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
aikimark  Yes !
0
aikimarkCommented:
In your example, there are non-empty cells that do not contain "09", such as 079, 019, and 039
0
ADRIANA PACCOUNTING 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
aikimarkCommented:
Are you always going to select two digits?  If not, how much variance?
0
ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
aikimark
 in this situation  i always look for 2 digit
0
aikimarkCommented:
Please test this:
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

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

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

Start your 7-day free trial
ADRIANA PACCOUNTING 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
aikimarkCommented:
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
ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
aikimark thanks

but

is not working
0
aikimarkCommented:
upload the workbook
0
ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
Here is !
98765_A.xlsm
0
aikimarkCommented:
The routine was missing an End Sub statement.
0
ADRIANA PACCOUNTING 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
ADRIANA PACCOUNTING 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.