fixing problem autofilter

Some videos you may like

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
38,993
Office Version
365
Platform
Windows
Change the field to 2, I forgot to change it.
 

abdelfattah

Well-known Member
Joined
May 3, 2019
Messages
527
Office Version
2010
when i write the first number the code works but when i complete the rest of numbers it disappears whole
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
38,993
Office Version
365
Platform
Windows
Suggestion.
Please explain EXACTLY what you are trying to do, rather than feed us little bits.
 

abdelfattah

Well-known Member
Joined
May 3, 2019
Messages
527
Office Version
2010
i would filter after write the first three numbers not the first number
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
38,993
Office Version
365
Platform
Windows
In that case simply remove the last 2 0s from the 100000000
 

abdelfattah

Well-known Member
Joined
May 3, 2019
Messages
527
Office Version
2010
i did it not success not show data again
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
38,993
Office Version
365
Platform
Windows
What is your current code?
 

abdelfattah

Well-known Member
Joined
May 3, 2019
Messages
527
Office Version
2010
this is my current code
VBA Code:
Private Sub TextBox1_Change()
Dim LastRow As Long
LastRow = Range("b1000").End(xlUp).Row
If ActiveSheet.TextBox1.Text <> "" Then
     Range("A3:M" & LastRow).AutoFilter 2, ">=" & ActiveSheet.TextBox1.Text * 1000000, xlAnd, "<" & (ActiveSheet.TextBox1.Text + 1) * 1000000
Else
Range("A3:m3").AutoFilter
End If
End Sub
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
38,993
Office Version
365
Platform
Windows
That works for me, did you put 3 digits into the textbox before running the code?
 

Watch MrExcel Video

Forum statistics

Threads
1,096,182
Messages
5,448,841
Members
405,533
Latest member
Heretical1

This Week's Hot Topics

Top