Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following macro that copies the value that in in cell A3 on the
EEInfo ws, pastes it to WOACreate worksheet and then print the WOACreate worksheet. What I want it to do is loop through all the values that are in column A on the EEInfo worksheet starting with cell A3. there is other columns on the worksheet, but I only want the values from each cell in column Acopied and pasted onto the WOACreate worksheet and then printed before continuing. Can anyone help with the looping. thanks in advance. Sub Macro2() Sheets("EEInfo").Select Range("A3").Select Selection.Copy Sheets("WOACreate").Select Range("C2").Select Selection.PasteSpecial Paste:=xlPasteValues, _ Operation:=xlNone, SkipBlanks :=False, Transpose:=False Application.CutCopyMode = False ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True End Sub -- jsm |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try something like this... (untested but it should be close)
Sub Macro2() dim rngSourceAll as range dim rngSource as range with Sheets("EEInfo") set rngsourceall = .range(.range("A3"), .cells(rows.count, "A").end(xlup)) end with for each rngsource in rngsourceall with Sheets("WOACreate") .range("C2").value = rngsource.value .printpreview 'change to .printout end with next rngsourceall End Sub -- HTH... Jim Thomlinson "Journey" wrote: I have the following macro that copies the value that in in cell A3 on the EEInfo ws, pastes it to WOACreate worksheet and then print the WOACreate worksheet. What I want it to do is loop through all the values that are in column A on the EEInfo worksheet starting with cell A3. there is other columns on the worksheet, but I only want the values from each cell in column Acopied and pasted onto the WOACreate worksheet and then printed before continuing. Can anyone help with the looping. thanks in advance. Sub Macro2() Sheets("EEInfo").Select Range("A3").Select Selection.Copy Sheets("WOACreate").Select Range("C2").Select Selection.PasteSpecial Paste:=xlPasteValues, _ Operation:=xlNone, SkipBlanks :=False, Transpose:=False Application.CutCopyMode = False ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True End Sub -- jsm |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
returning back to loop check condition without completing the loop | Excel Programming | |||
Loop to Filter, Name Sheets. If Blank, Exit Loop | Excel Programming | |||
Naming Worksheets - Loop within a loop issue | Excel Programming | |||
(Complex) Loop within loop to create worksheets | Excel Programming | |||
Advancing outer Loop Based on criteria of inner loop | Excel Programming |