Hello,
1st time poster
Excel level NOOB
So I have a workbook and on page 1 of the workbook A22 through A40=A22 through A40 of page 2. A22 through A40 on both page 1 and 2 are formatted as general. The idea here is that I need the data on page 1 to reflect the data on page 2 however on page 2 I may only have text data in some of the rows between A22 and A40 so I am left with rows on page 1 with 0 in them "not sure why its putting a 0 there when the formula in it is linking it to the data in that row on page 2. So I want to in VB hide the rows with a zero value by clicking a button. I have the button figured out and assigned the following macro that I found in a thread on here "thanks!"
Sub Test_Hide_0()
Application.ScreenUpdating = False
Dim i As Integer
Dim Lastrow As Long
With Sheets("Morning Report")
Lastrow = .Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To Lastrow
If .Cells(i, 1).Value = "0" Then .Rows(i).Hidden = True
Next
End With
Application.ScreenUpdating = True
End Sub
I need page 1 to unhide hidden rows when updates are made to page 2 the data that is entered on page 2 will always be a text value not numerical. So when I hit the run macro button on page 1 it will unhide any cells that were previously hidden due to a 0 value that has changed to a text value.
1st time poster
Excel level NOOB
So I have a workbook and on page 1 of the workbook A22 through A40=A22 through A40 of page 2. A22 through A40 on both page 1 and 2 are formatted as general. The idea here is that I need the data on page 1 to reflect the data on page 2 however on page 2 I may only have text data in some of the rows between A22 and A40 so I am left with rows on page 1 with 0 in them "not sure why its putting a 0 there when the formula in it is linking it to the data in that row on page 2. So I want to in VB hide the rows with a zero value by clicking a button. I have the button figured out and assigned the following macro that I found in a thread on here "thanks!"
Sub Test_Hide_0()
Application.ScreenUpdating = False
Dim i As Integer
Dim Lastrow As Long
With Sheets("Morning Report")
Lastrow = .Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To Lastrow
If .Cells(i, 1).Value = "0" Then .Rows(i).Hidden = True
Next
End With
Application.ScreenUpdating = True
End Sub
I need page 1 to unhide hidden rows when updates are made to page 2 the data that is entered on page 2 will always be a text value not numerical. So when I hit the run macro button on page 1 it will unhide any cells that were previously hidden due to a 0 value that has changed to a text value.