Computing.Net > Forums > Office Software > show only cells of a certian value

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

show only cells of a certian value

Reply to Message Icon

Name: mherber2
Date: August 9, 2008 at 14:36:46 Pacific
OS: xp
CPU/Ram: unknown
Product: unknown
Comment:

ok i need help...i somewhat knowwhat i need but need help doing it...if anyone can help it would be much appreciated.

i have a sheets with about 1420 rows and 3 columns. i have a text box and a button.

i need to have the user input there search in to the textbox and press the search button
and only rows meeting the search cracteria will show and the rest will be hidden. i only need to search in column 2 but i need to search all rows.

i was thinking of something along the lines of

[hide all rows]
if textbox = [any value in column 2] then [show rows with the value matching the textbox]

if any one has any ideas or would like to help me with mine i would be very greatful



Sponsored Link
Ads by Google

Response Number 1
Name: DerbyDad03
Date: August 9, 2008 at 19:05:16 Pacific
Reply:

I would use a macro with an InputBox to accept the user's text.

I would then modify the VBA Help example for Find.

The example is already set to loop through a range and repeat the same action each time it finds what it is looking for. However, instead of having it change the value in the cell, change it to set each found cell to EntireRow.Hidden = False


0

Response Number 2
Name: DerbyDad03
Date: August 9, 2008 at 21:15:29 Pacific
Reply:

What was I thinking? The VBA Find method doesn't work on Hidden rows.

Try a simple For-Next loop instead.

Sub ShowInputWord()
Application.ScreenUpdating = False
Rows("1:1430").EntireRow.Hidden = False
MyWord = Application.InputBox("Gimme Something To Work With")
For x = 1 To 1430
If Cells(x, 2) <> MyWord Then Cells(x, 2).EntireRow.Hidden = True
Next
Application.ScreenUpdating = True
End Sub


0

Response Number 3
Name: mherber2
Date: August 10, 2008 at 09:59:48 Pacific
Reply:

thank you so much... im dont really know much about loops in excel but with your example im sure i could learn alot. thank you both for all your help


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: show only cells of a certian value

Restrict duplicatoin of a number www.computing.net/answers/office/restrict-duplicatoin-of-a-number/3142.html

Replace word with value of a cell www.computing.net/answers/office/replace-word-with-value-of-a-cell/7505.html

checking appearance of a number, an www.computing.net/answers/office/checking-appearance-of-a-number-an/4678.html