Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Macro for Multiple Spreadsheets

Is it possible to do a macro to update information between the
following situation.

1 - Journal Spreadsheet - same every week - needs to be updated in
cells J2, J5, J8, etc.
every 3rd cell with information from spreadsheet 2.
2 - Payroll Spreadsheet - different every week - information in column
H - cells H13, H14, H15 update cells in spreadsheet 1 - i.e. H13 to
J2, H14 to J5, H15 to J8, etc.

When the new payroll spreadsheet (spreadsheet 3) comes into play, it
has a different name because of the date i.e. Payroll 2-15-08 - my
macro only works from Spreadsheet 1 to Spreadsheet 2 - when
Spreadsheet 3 comes into play - is there a way to do a macro to use
this new information to go into ss 1 - the Journal? Can this be done
when it has a new name (different date)?

I know about the + and = signs - to update/change information from one
spreadsheet to another - that is how I wrote my first macro. The
cells we need to use for the updated information are in the same
location every week.

Any help would be appreciated - or suggestions on how to do
different! Thank you!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Macro for Multiple Spreadsheets

There are tow solution. I prefer solution 2, but solution 1 is a little bit
easier

1) You can access a sheet by its position in the workbook. Sheets can be
move a put in any order you want. So if the payroll sheet is the 3rd tab
then use this code

with sheets(3)

end with


2) the second method is to look for a spreadsheet with the name starting
with payroll

Sub test1()

For Each sht In ThisWorkbook.Sheets
If Left(sht.Name, 7) = "Payroll" Then
Set pay_sht = sht
Exit For
End If
Next sht

With pay_sht


End With

End Sub


" wrote:

Is it possible to do a macro to update information between the
following situation.

1 - Journal Spreadsheet - same every week - needs to be updated in
cells J2, J5, J8, etc.
every 3rd cell with information from spreadsheet 2.
2 - Payroll Spreadsheet - different every week - information in column
H - cells H13, H14, H15 update cells in spreadsheet 1 - i.e. H13 to
J2, H14 to J5, H15 to J8, etc.

When the new payroll spreadsheet (spreadsheet 3) comes into play, it
has a different name because of the date i.e. Payroll 2-15-08 - my
macro only works from Spreadsheet 1 to Spreadsheet 2 - when
Spreadsheet 3 comes into play - is there a way to do a macro to use
this new information to go into ss 1 - the Journal? Can this be done
when it has a new name (different date)?

I know about the + and = signs - to update/change information from one
spreadsheet to another - that is how I wrote my first macro. The
cells we need to use for the updated information are in the same
location every week.

Any help would be appreciated - or suggestions on how to do
different! Thank you!

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
Multiple spreadsheets Karen[_2_] Setting up and Configuration of Excel 2 October 8th 07 03:05 PM
Using a macro to open spreadsheets Tristan Excel Discussion (Misc queries) 2 June 21st 07 04:09 PM
multiple spreadsheets Jack Setting up and Configuration of Excel 3 June 27th 06 08:10 PM
Combine two spreadsheets using Macro jlogsdon Excel Worksheet Functions 0 May 23rd 05 11:14 PM
How to update multiple links in multiple spreadsheets followin mo. Andy Excel Worksheet Functions 0 January 20th 05 04:51 PM


All times are GMT +1. The time now is 05:10 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"