Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default how do I get a macro to change a cell in multiple worksheets?

I have a workbook that pulls data from another file and generates 4
additional worksheets (e.g.: W1A 4_27, W1B 4_27, W2A 4_27, W2B 4_27). The
data pulled is loaded onto pre-formatted sheets. I then have to manually
update the current and previous month names (and year if previous month was
December) for sheets 1, update the month names for sheets 2, save the sheets
with the updated data and include the date of the pull in the tab name. Every
sheet retains the last entered month name/year prior to being updated.
I need to create a macro that can automate most of the manual steps and do
the following:

Find out what the last entries were for the listed Months and years€¦
A) Sheet1A
1) Update the Current Month Name in cells B6 (e.g.: Mar Balances)
2) Update the Previous Month Name in E6 (Feb balances).
3) IF the Previous Month Name in E6 = "Dec balances," Update the listed YEAR
in cells B7 and C7
4) Update tab/worksheet name (e.g.: if it were W1A 3_3, and pull was made on
04/27, new name will be W1A 4_27)

B) Sheet1B
1) Update the Current Month Name in cells B7 (e.g.: Mar Balances)
2) Update the Previous Month Name in C7 (Feb balances).
3) IF the Previous Month Name in E7 = "Dec balances," Update the listed YEAR
in cells B8 and C8
4) Update tab/worksheet name

C) Sheet2A
1) Update the Month Name in cells B7 (e.g.: Mar)
2) IF the last entry for Month Name in B7 = "Dec" Update the listed YEAR in
cells B6
3) Update tab/worksheet name

C) Sheet2B
1) Update the Month Name in cells B8 (e.g.: Mar)
2) IF the last entry for Month Name in B8 = "Dec" Update the listed YEAR in
cells B7
3) Update tab/worksheet name

any help is welcome!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,089
Default how do I get a macro to change a cell in multiple worksheets?

Record the actions you take as you do this manually. Stop the recording and
look at the code. It won't be the most efficient and you will need to
modify it to copy with different months and years but it will be a start.

The recorded macro will always do what it did the first time you recorded it
so you *will* need to change it.

Regards

Trevor


"BB_XLNovice" wrote in message
...
I have a workbook that pulls data from another file and generates 4
additional worksheets (e.g.: W1A 4_27, W1B 4_27, W2A 4_27, W2B 4_27). The
data pulled is loaded onto pre-formatted sheets. I then have to manually
update the current and previous month names (and year if previous month
was
December) for sheets 1, update the month names for sheets 2, save the
sheets
with the updated data and include the date of the pull in the tab name.
Every
sheet retains the last entered month name/year prior to being updated.
I need to create a macro that can automate most of the manual steps and do
the following:

Find out what the last entries were for the listed Months and years.
A) Sheet1A
1) Update the Current Month Name in cells B6 (e.g.: Mar Balances)
2) Update the Previous Month Name in E6 (Feb balances).
3) IF the Previous Month Name in E6 = "Dec balances," Update the listed
YEAR
in cells B7 and C7
4) Update tab/worksheet name (e.g.: if it were W1A 3_3, and pull was made
on
04/27, new name will be W1A 4_27)

B) Sheet1B
1) Update the Current Month Name in cells B7 (e.g.: Mar Balances)
2) Update the Previous Month Name in C7 (Feb balances).
3) IF the Previous Month Name in E7 = "Dec balances," Update the listed
YEAR
in cells B8 and C8
4) Update tab/worksheet name

C) Sheet2A
1) Update the Month Name in cells B7 (e.g.: Mar)
2) IF the last entry for Month Name in B7 = "Dec" Update the listed YEAR
in
cells B6
3) Update tab/worksheet name

C) Sheet2B
1) Update the Month Name in cells B8 (e.g.: Mar)
2) IF the last entry for Month Name in B8 = "Dec" Update the listed YEAR
in
cells B7
3) Update tab/worksheet name

any help is welcome!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run a macro on multiple worksheets? J@Y Excel Discussion (Misc queries) 3 February 3rd 07 10:24 AM
MACRO AND MULTIPLE WORKSHEETS Mel Excel Worksheet Functions 8 January 21st 07 02:53 PM
Sum cells in multiple worksheets which change every month mnew27 Excel Discussion (Misc queries) 3 June 23rd 06 10:04 AM
Use a macro on multiple Worksheets Bwoods Excel Discussion (Misc queries) 1 March 19th 06 11:20 PM
Macro to change worksheets in the same workbook James C Excel Discussion (Misc queries) 2 October 19th 05 08:04 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"