Hello
I'm looking for some help on the below code. I basically want the cell K15:O16 to update the value from the range C6:C8 and K9:O10 to update from D6:D8 range.
I am able to get this working when only updating one cell after each print, but I cannot seem to get both cells updating. The below code sort of works, however it prints me 9 pages with every combination instead of just printing 3 and working down both ranges.
Thank you for any help in advance!
I'm looking for some help on the below code. I basically want the cell K15:O16 to update the value from the range C6:C8 and K9:O10 to update from D6:D8 range.
I am able to get this working when only updating one cell after each print, but I cannot seem to get both cells updating. The below code sort of works, however it prints me 9 pages with every combination instead of just printing 3 and working down both ranges.
Thank you for any help in advance!
Code:
Sub LoopRange()
Dim rCell As Range
Dim rRng As Range
Dim iCell As Range
Dim iRng As Range
Set rRng = Worksheets("MASTER").Range("C6:C8")
Set iRng = Worksheets("MASTER").Range("D6:D8")
For Each rCell In rRng.Rows
For Each iCell In iRng.Rows
Worksheets("cSheet").Range("K15:O16").Value = rCell.Value
Worksheets("cSheet").Range("K9:O10").Value = iCell.Value
Worksheets("cSheet").PrintOut
Next
Next
End Sub