Somendra Misra
Excel Ninja
Do repeat pt 1 in my above comment. Its working at my end.
Regards,
Regards,
Works perfect now. Thnak you. DO you mind if I ask addtionjal question should I encounter any additonl issues as I contoinue to decvlop this modle?Do repeat pt 1 in my above comment. Its working at my end.
Regards,
Hi Mark ,
An additional check can be included within the code , so that if a particular worksheet does not have any data , it is skipped in the rollup.
Please confirm first that the macro does what you want it to do.
Narayan
Works perfect now. Thnak you. DO you mind if I ask addtionjal question should I encounter any additonl issues as I contoinue to decvlop this modle?
Thank you again.
Mark in Plano, TX (20 degrees here now - yikes!)
Please disregard the Works perfect now - I mistakenly sent unedited and before review of my actual file which I hadn't looked in a couple of days prior to today.
Ooppss...revised attached.Hi Mark ,
In your file , the tab labelled Sample1 has a header for the error responses section , with the result the actual data starts from cell A31. In the other two sheets Sample2 and Sample3 , there are no headers , with the result the actual data starts from cell A28.
Can this be standardized ?
Narayan
Oh, just FYI that in PART 2, Yes means OK, No means Error found and documented in PART 3, and N/A just means N/A.Hi Mark ,
In your file , the tab labelled Sample1 has a header for the error responses section , with the result the actual data starts from cell A31. In the other two sheets Sample2 and Sample3 , there are no headers , with the result the actual data starts from cell A28.
Can this be standardized ?
Narayan
Excellent.Hi Mark ,
See if this is OK.
Please remember that each time you run the macro , it will go through all the sheets , and overwrite what ever was there earlier on the Rollup tab.
Narayan
Option Explicit
Sub SomethingAnythingEverything()
' constants
Const ksSummaryWS = "Rollup"
Const ksSummaryRange = "ErrorTable"
Const ksChildTopRight = "D2"
' declarations
Dim rngS As Range, rngC As Range
Dim I As Integer, J As Integer
' start
Set rngS = Worksheets(ksSummaryWS).Range(ksSummaryRange)
With rngS
If .Rows.Count > 1 Then Range(.Rows(2), .Rows(.Rows.Count)).ClearContents
End With
I = 1
' process
For J = 1 To Worksheets.Count
With Worksheets(J)
If .Name <> ksSummaryWS Then
If .Range(ksChildTopRight).Value <> "" Then
Set rngC = Range(.Range(ksChildTopRight), _
.Range(ksChildTopRight).End(xlDown).End(xlDown).End(xlUp).End(xlToLeft).End(xlToLeft))
rngC.Copy
rngS.Cells(I + 1, 1).PasteSpecial xlPasteValues
I = I + rngC.Rows.Count
End If
End If
End With
Next J
' end
Application.CutCopyMode = False
rngS.Cells(2, 1).Select
Set rngC = Nothing
Set rngS = Nothing
Beep
End Sub
Thank you very kindly, but I can't use your solution. Reason is code. I don't understand code nor will I be able to maintain the code given changes to the format and things like that. Guess I was looking for a function solution, whcih I do underdstand. I'm going to use some of your tips from previous file uploads, but I think for the sake of finally putting this matter to rest, I'm just going to take the hard way and link all 12 cells from each tab times 80 tabs giving me 960 rows on the rollup tab, format with F5 to fill in the blank cells, sort, and then pivot. Thnak you for your input. In the future, I'll be more clear of my issue and clearly explain that I'm not seeking a code soluiton.Hi, cibyerx1!
Surely a bit late but just in case give a look at the uploaded file. This is the code:
Code:Option Explicit Sub SomethingAnythingEverything() ' constants Const ksSummaryWS = "Rollup" Const ksSummaryRange = "ErrorTable" Const ksChildTopRight = "D2" ' declarations Dim rngS As Range, rngC As Range Dim I As Integer, J As Integer ' start Set rngS = Worksheets(ksSummaryWS).Range(ksSummaryRange) With rngS If .Rows.Count > 1 Then Range(.Rows(2), .Rows(.Rows.Count)).ClearContents End With I = 1 ' process For J = 1 To Worksheets.Count With Worksheets(J) If .Name <> ksSummaryWS Then If .Range(ksChildTopRight).Value <> "" Then Set rngC = Range(.Range(ksChildTopRight), _ .Range(ksChildTopRight).End(xlDown).End(xlDown).End(xlUp).End(xlToLeft).End(xlToLeft)) rngC.Copy rngS.Cells(I + 1, 1).PasteSpecial xlPasteValues I = I + rngC.Rows.Count End If End If End With Next J ' end Application.CutCopyMode = False rngS.Cells(2, 1).Select Set rngC = Nothing Set rngS = Nothing Beep End Sub
Just advise if any issue.
Regards!
After some quick trials, even the F5 function isn't gogin to help me with my problem - I'm just screwed at this pointThank you very kindly, but I can't use your solution. Reason is code. I don't understand code nor will I be able to maintain the code given changes to the format and things like that. Guess I was looking for a function solution, whcih I do underdstand. I'm going to use some of your tips from previous file uploads, but I think for the sake of finally putting this matter to rest, I'm just going to take the hard way and link all 12 cells from each tab times 80 tabs giving me 960 rows on the rollup tab, format with F5 to fill in the blank cells, sort, and then pivot. Thnak you for your input. In the future, I'll be more clear of my issue and clearly explain that I'm not seeking a code soluiton.
Take care.
' constants
Const ksSummaryWS = "Rollup"
Const ksSummaryRange = "ErrorTable"
Const ksChildTopRight = "D2"
' declarations
Dim rngS As Range, rngC As Range
Dim I As Integer, J As Integer
' start
Set rngS = Worksheets(ksSummaryWS).Range(ksSummaryRange)
With rngS
If .Rows.Count > 1 Then Range(.Rows(2), .Rows(.Rows.Count)).ClearContents
End With
I = 1
' process
For J = 1 To Worksheets.Count
With Worksheets(J)
If .Name <> ksSummaryWS Then
If .Range(ksChildTopRight).Value <> "" Then
Set rngC = Range(.Range(ksChildTopRight), _
.Range(ksChildTopRight).End(xlDown).End(xlDown).End(xlUp).End(xlToLeft).End(xlToLeft))
rngC.Copy
rngS.Cells(I + 1, 1).PasteSpecial xlPasteValues
I = I + rngC.Rows.Count
End If
End If
End With
Next J
' end
Application.CutCopyMode = False
rngS.Cells(2, 1).Select
Set rngC = Nothing
Set rngS = Nothing
Beep