Formula or macro to hide cell information for hidden row

RPM7

Board Regular
Joined
Nov 28, 2007
Messages
191
Is there a formula that will display the status of the current row?

I'm using filters to show/hide rows; however, I have a range that is displaying information about each respective rows.
I have a VBA macro that then lists the information in the range but it shows everything including the hidden rows.

I have two options essentially.
Either change the VBA to ignore hidden rows in the range or

Code:
Private Sub CommandButton1_Click()

Dim cell As Range, cRange As Range, Warning As String

Set cRange = ActiveSheet.Range("EV13:EV50")

    For Each cell In cRange
        If cell.Value <> "" Then
            Warning = Warning & cell.Offset(0, 0).Value & vbCr & vbCr
        End If
    Next cell
    CommandButton1.BackColor = RGB(255, 255, 255)
    CommandButton1.Caption = "View Error Report"
    MsgBox Warning, vbOKOnly, "Error Report"

End Sub


Or I can use a formula to display a blank cell if its respective row is empty.

Code:
IF(current row =hidden,"",data)

Does anyone know if this is possible?
My VBA experience is basic at best, hence I would be happy to use a formula if one existed.

Thanks
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

Forum statistics

Threads
1,214,657
Messages
6,120,764
Members
448,991
Latest member
Hanakoro

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top