Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
[newbie] Macro for "copy and paste"
I have an excel sheet which needs to copy values iteratively.
So for example, on sheet 2 I want to 1. copy value of sheet 1 cell A1 to sheet 2 cell A1 2. print it or send it to a print queue 3. clear the values from sheet 2 cell A1 4. copy value of sheet 1 cell A2 to sheet 2 cell A1 (replace contents) The above process would be repeated for a number of values that is displayed within sheet 1 cell A1. Any ideas how to go about it? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
[newbie] Macro for "copy and paste"
Dear Jon..........try this
Sub PrintSheet2() Dim lngRow Dim wrbMyBook Set wrbMyBook = ActiveWorkbook lngRow = 1 Do While wrbMyBook.Sheets("Sheet1").Range("A" & lngRow) < "" wrbMyBook.Sheets("Sheet2").Range("A1") = wrbMyBook.Sheets("Sheet1").Range("A" & lngRow) wrbMyBook.Sheets("Sheet2").PrintOut Copies:=1, Collate:=True lngRow = lngRow + 1 Loop End Sub If this post helps click Yes --------------- Jacob Skaria "Jon" wrote: I have an excel sheet which needs to copy values iteratively. So for example, on sheet 2 I want to 1. copy value of sheet 1 cell A1 to sheet 2 cell A1 2. print it or send it to a print queue 3. clear the values from sheet 2 cell A1 4. copy value of sheet 1 cell A2 to sheet 2 cell A1 (replace contents) The above process would be repeated for a number of values that is displayed within sheet 1 cell A1. Any ideas how to go about it? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to copy a pivot table and "paste special" formats in excel 07 | Excel Discussion (Misc queries) | |||
problem with Linking workbooks via "copy" and "paste link" | Excel Discussion (Misc queries) | |||
Macro to find copy "header" and paste | Excel Discussion (Misc queries) | |||
Auto "copy and paste" individual cells from various sheets into one sheet ?? | Excel Discussion (Misc queries) | |||
Complex if test program possible? If "value" "value", paste "value" in another cell? | Excel Discussion (Misc queries) |