Would like help with displaying data if are a certain value is
Adrian
This macro will hide all rows that have a blank cell in Column E. Note
that this macro assumes that Column A has a non-blank entry in the last row
of your data so that Excel will know what the last row of your data is in
order to hide the last row of your data if that row has a blank cell in
Column E.
Copy this macro to a standard module.
Then select the sheet that has your data.
Click on View - Toolbars - Forms.
The second icon from the top in the right column is a button icon.
Click on that icon.
Go to where you want the button to be.
Hold down the left button of your mouse and draw the button on the sheet.
Release the mouse button.
A dialog box pops up asking you to assign a macro to that button. Select
this macro and click OK.
That's it.
HTH Otto
Sub HideRows()
Dim RngColA As Range
Dim i As Range
Set RngColA = Range("A2", Range("A" & Rows.Count).End(xlUp))
For Each i In RngColA
If IsEmpty(i.Offset(, 4)) Then i.EntireRow.Hidden = True
Next i
End Sub
"Adrian" wrote in message
...
OK, I can understand that what I want to do is very complicated.
Before I email you direct, I have thought of a simpler, if not so go
solution.
Could someone show how to create a button or something that when clicked
hides any rows that do not have a value in a certain column?
(that would work just as well as I could set the page up not to print the
column that is used to say something is selected).
If I don't get an answer on this one, then I'll email you direct Otto.
(Thanks for the offer)
|