I'm looping thru various workbooks and adding values in row 18, columns "H" thru "Q" to a workbook named Master with a sheet named Summary. In the code, when I reach the first cell of H18 in the workbook I'm looping thru, I want that value added to cell H18 of the Master.Summary workbook/sheet. When I loop thru the next workbook (code not shown) I want perform the same action. The end result is that Master.Summary H18 (and other cells) will have the summed values of the individual sheets.
For example, if I'm in cellH18 of the activeworkbook, I would like the code to saysomething like " Master.Summary.Range(H18).value=Master.Summary.Range(H18).value + Activeworkbook.Activesheet.Range(H18).value.
Thanks for any help
Mike
Dim rngTarget As Range
Dim wks As Worksheet
Set wks = ActiveSheet
For Each wks In ActiveWorkbook.Worksheets
Set rngTarget = wks.Range("H" &18 ":Q" & 18)
For Each rng In rngTarget
I'M NOT SURE WHAT CODE GOES IN HERE.
Next rng
Next
End Sub
For example, if I'm in cellH18 of the activeworkbook, I would like the code to saysomething like " Master.Summary.Range(H18).value=Master.Summary.Range(H18).value + Activeworkbook.Activesheet.Range(H18).value.
Thanks for any help
Mike
Dim rngTarget As Range
Dim wks As Worksheet
Set wks = ActiveSheet
For Each wks In ActiveWorkbook.Worksheets
Set rngTarget = wks.Range("H" &18 ":Q" & 18)
For Each rng In rngTarget
I'M NOT SURE WHAT CODE GOES IN HERE.
Next rng
Next
End Sub