arihan1511
New Member
I have a database in sheet 2 which has certain rows hidden.I want to copy this data to sheet 1 which also has certain rows hidden but hidden rows are different on both sheets.
I have this macro which copies visible data from sheet2 to sheet 1 then sheet1 printout is taken but since hidden rows are different in both sheets ,certain rows of sheet 2 are not visible on sheet 1
I tried by modifyng line Destination:=Sheets("Sheet1").Range("A2").SpecialCells(xlCellTypeVisible) but its not working
Even macro recorded code not working
Pl note hidden rows are not constant and they differ each time data is copied
Can anyone help me in getting a working code to Copy Visible Range from sheet2 and paste to Visible Range of Sheet1
I have this macro which copies visible data from sheet2 to sheet 1 then sheet1 printout is taken but since hidden rows are different in both sheets ,certain rows of sheet 2 are not visible on sheet 1
Code:
Sub CopyRangevisible()
Sheets("Sheet2").Range("A2:F20").SpecialCells(xlCellTypeVisible).Copy _
Destination:=Sheets("Sheet1").Range("A2")
End Sub
I tried by modifyng line Destination:=Sheets("Sheet1").Range("A2").SpecialCells(xlCellTypeVisible) but its not working
Even macro recorded code not working
Pl note hidden rows are not constant and they differ each time data is copied
Can anyone help me in getting a working code to Copy Visible Range from sheet2 and paste to Visible Range of Sheet1