I have a spreadsheet named "Data Sheet" that collects data from other worksheets via formulas and works perfectly. I need a macro that will copy the data from multiple rows so I can paste into a seperate workbook. I have 30 rows of data ranging from A3:EI3 to A32:EI32. This data is collected from 1 to 30 other sheets if they are made visible and data entered. Here is the tricky part. I only want to collect the data from the visible sheets. Here is an example of the flow I am looking for. "Sheet 1" is always visible and never is hidden, "Sheet 2", "Sheet 3", "Sheet 4" are visible but "Sheet 5" through "Sheet 30" are still hidden. "Data Sheet" has already collected the data from the visible sheets, but the remaining rows (Sheets 5-30) all show "0" in the data cells. I now want to run a macro that will copy the data (to the clipboard) from "Data Sheet" row 3 (represents Sheet 1), row 4 (represents "Sheet 2"), etc and allow me to paste into the next available row in another workbook. Here is the code that works for a single row of data. Thanks in advance for your expertise. VBA Code:
Sub CopyDataSheet()
'
' CopyDataSheet Macro
'
Application.ScreenUpdating = False
Sheets("Data Sheet").Visible = True
Sheets("Data Sheet").Select
Rows("3:3").Select
Selection.Copy
Rows("1:1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("E1:EF1").Select
Application.CutCopyMode = False
Selection.NumberFormat = "0"
Rows("1:1").Select
Range("B1").Activate
Selection.Copy
Sheets("Sheet 1").Select
Range("a38").Select
Sheets("Data Sheet").Visible = True
Application.ScreenUpdating = True
MsgBox "YOU HAVE CAPTURED ALL ENTERED DATA..." & _
vbCrLf & vbCrLf & "CLICK OK" _
& vbCrLf & vbCrLf & "PASTE INTO NEXT EMPTY LINE OF DATA SHEET", _
vbInformation, ""
End Subenter code here