Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 139
Default New to macros, need to update worksheets

I've just learned how to do macros in a class and am hoping to apply it to
something at work.

We have a workbook (with MANY spreadsheets) that reflect billing. The main
sheet is updated each month - Column H has January info and Column I will
have Feb info.

Then there are sheets for each program. Each sheet has some numerical data
and a chart. After January's information was entered, the data on each sheet
was manually changed to refer to column H. Once Feb's info is entered, it
will manually be changed to refer to column I (the new data). Is this
something that can be automated with a macro??

Bear with me because this is to new to me, but I know there has to be a
better way to handle this workbook.
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default New to macros, need to update worksheets

-- Are all the sheets except for the main sheet to be updated?
-- Is it the same cells in each program sheet that need to be updated?
-- How would you identify which cells on the main sheet contain the updated
data for each specific program?

Ed

"Tina" wrote in message
...
I've just learned how to do macros in a class and am hoping to apply it to
something at work.

We have a workbook (with MANY spreadsheets) that reflect billing. The

main
sheet is updated each month - Column H has January info and Column I will
have Feb info.

Then there are sheets for each program. Each sheet has some numerical

data
and a chart. After January's information was entered, the data on each

sheet
was manually changed to refer to column H. Once Feb's info is entered, it
will manually be changed to refer to column I (the new data). Is this
something that can be automated with a macro??

Bear with me because this is to new to me, but I know there has to be a
better way to handle this workbook.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 139
Default New to macros, need to update worksheets

see below - thanks

"Ed" wrote:

-- Are all the sheets except for the main sheet to be updated? YES
-- Is it the same cells in each program sheet that need to be updated? YES
-- How would you identify which cells on the main sheet contain the updated
data for each specific program? I DON'T KNOW - I'm honestly not sure how to go about this...

Ed

"Tina" wrote in message
...
I've just learned how to do macros in a class and am hoping to apply it to
something at work.

We have a workbook (with MANY spreadsheets) that reflect billing. The

main
sheet is updated each month - Column H has January info and Column I will
have Feb info.

Then there are sheets for each program. Each sheet has some numerical

data
and a chart. After January's information was entered, the data on each

sheet
was manually changed to refer to column H. Once Feb's info is entered, it
will manually be changed to refer to column I (the new data). Is this
something that can be automated with a macro??

Bear with me because this is to new to me, but I know there has to be a
better way to handle this workbook.




  #4   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default New to macros, need to update worksheets

-- How would you identify which cells on the main sheet contain the
updated
data for each specific program? I DON'T KNOW - I'm honestly not sure

how to go about this...

What I mean is: when you look at the main sheet, how do you know which data
cells go with which program? For instance, is the program name listed down
Column A, and the data for that program is in H of the same row? How many
cells need to be updated from the main sheet, and how do you know which ones
they are?

The biggest thing to remember about any routine like this is that it can
almost always be broken into smaller increments. When you take it one step
at a time, it's not so very intimidating. You do have to be able to
identify the process you would use without a macro, because your macro is
going to have to do that same process. And what we know intuitively when we
look at our work has to be spelled out in detail for in the code.

Try this:
-- Create a new Excel workbook and give it some more worksheets.
-- Put the macro below into a module. (With Excel open, press ALT+F11 -
this opens the Visual Basic Editor (VBE). Go to Insert Module. Copy
everything below from "Sub UpdateAllSheets()" to "End Sub".)
-- Back in Excel, press ALT+F8 to bring up a list of macros. Choose
"UpdateAllSheets" and see what happens. (The macro sets the Zoom percentage
for every sheet except Sheet1.)
-- Go back to the VBE and look at the code, and see if you can understand
what the code is doing.

Ed

Sub UpdateAllSheets()

Dim objWkbk As Workbook
Dim objWksh As Worksheet
Dim strZm As String
Dim intZm As Integer

Set objWkbk = ActiveWorkbook

strZm = InputBox("What zoom?")
If strZm = "" Then GoTo ExitHere

intZm = strZm

For Each objWksh In objWkbk.Sheets
If objWksh.Name < "Sheet1" Then
objWksh.Activate
ActiveWindow.Zoom = intZm
objWksh.Range("A1").Select
End If
Next objWksh

objWkbk.Sheets("Sheet1").Activate

ExitHe
End Sub

"Tina" wrote in message
...
see below - thanks

"Ed" wrote:

-- Are all the sheets except for the main sheet to be updated? YES
-- Is it the same cells in each program sheet that need to be updated?

YES
-- How would you identify which cells on the main sheet contain the

updated
data for each specific program? I DON'T KNOW - I'm honestly not sure

how to go about this...

Ed

"Tina" wrote in message
...
I've just learned how to do macros in a class and am hoping to apply

it to
something at work.

We have a workbook (with MANY spreadsheets) that reflect billing. The

main
sheet is updated each month - Column H has January info and Column I

will
have Feb info.

Then there are sheets for each program. Each sheet has some numerical

data
and a chart. After January's information was entered, the data on

each
sheet
was manually changed to refer to column H. Once Feb's info is

entered, it
will manually be changed to refer to column I (the new data). Is this
something that can be automated with a macro??

Bear with me because this is to new to me, but I know there has to be

a
better way to handle this workbook.






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
How do I update charts using macros Seng Charts and Charting in Excel 3 November 29th 05 06:02 PM
Macros To Update Charts Thriller Excel Programming 2 August 26th 05 04:34 AM
Macros to Open & Update Files Diane Alsing Excel Programming 4 January 28th 05 11:18 PM
Problem Organizing Macros under XP UPDATE Peter Chatterton[_2_] Excel Programming 0 October 12th 04 09:47 PM
Update Links/Trust Macros? Joel Excel Programming 1 August 21st 03 12:28 AM


All times are GMT +1. The time now is 03:37 PM.

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"