Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
pls help with macro
Option Explicit
Sub Main() Dim rSourceRange As Range Dim rTargetRange As Range Set rSourceRange = _ Worksheets("Sheet1").Range("B1:B10") Set rTargetRange = _ Worksheets("Sheet2").Range("B1:B10") rTargetRange.Value = 0.01 rSourceRange.Copy rTargetRange.PasteSpecial _ Paste:=xlPasteAll, _ Operation:=xlAdd, _ SkipBlanks:=False, _ Transpose:=False Application.CutCopyMode = False Set rSourceRange = Nothing Set rTargetRange = Nothing End Sub -- Bob Kilmer "Sam" wrote in message om... INCREMENTAL MACRO this is my data COLUMN COLUMN A B ------- ---------------- A 1% B 2% C 4% D 2% E 1% F 2% G 4% H 7% I 1% J 2% i want to write a macro that will add 0.01 to CELL B1 AND COPY THIS DATA TO SHEET 2 , THEN RESET CELLB1 BACK TO ORIGINAL VALUE AND THEN ADD 0.01 TO CELL B2 AND DO THE SAME AS ABOVE AND GO ON UNTIL ROW 10 ...... IN THIS WAY I NEED TO SEE ON SHEET 2 - THE NEW DATA WITH INCREMENTS OFF 0.01 MADE TO ALL THE VALUES IN COLUMN B .... pls help sam |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
need help to update macro to office 2007 macro enabled workbook | Excel Discussion (Misc queries) | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) |