ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Multiple worsheets (https://www.excelbanter.com/excel-programming/292304-multiple-worsheets.html)

DavidL

Multiple worsheets
 
I know how to link worksheets. But I have a problem with
creating a macro linking multiple sheets and having an
incremental increase occur in the same col. over a period
of time. I have two col. with information on sheet one,
these numbers need to icrease by three(3) percent on the
following seven worksheets. I recorded a macro using
absolute refrencing columns on the first sheet. That works
fine on the second sheet, but then keeps refering to sheet
one. I need to increment the increase of 3% onto each of
the seven following workseets. Any help will be
appreciated.

Thanks.
David L.

Tom Ogilvy

Multiple worsheets
 
Dim k as long, dblinc as double, addr as string
Dim cell as range
dblinc = 1
addr = "A1:A20,F1:F20"
for k = 1 to 7
set sh = sh.next
dblinc = dblinc * 1.03
for each cell in sh.range(addr)
cell.value = cell.value * dblinc
Next
Loop


--
Regards,
Tom Ogilvy


"DavidL" wrote in message
...
I know how to link worksheets. But I have a problem with
creating a macro linking multiple sheets and having an
incremental increase occur in the same col. over a period
of time. I have two col. with information on sheet one,
these numbers need to icrease by three(3) percent on the
following seven worksheets. I recorded a macro using
absolute refrencing columns on the first sheet. That works
fine on the second sheet, but then keeps refering to sheet
one. I need to increment the increase of 3% onto each of
the seven following workseets. Any help will be
appreciated.

Thanks.
David L.





All times are GMT +1. The time now is 03:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com