?
Solved

How do I build VBA in Excel to edit muiltiple sheets in a workbook and then produce a graph for each sheet?

Posted on 2011-02-16
3
Medium Priority
?
321 Views
Last Modified: 2013-11-05
The attached worksheet has master sheet called (Incremental EEI), which contains 31 days of data.  I've segregated the data by date on seperate sheets.  Sheet2 I edit ed the array to include only hourly increments, and created graph.  I have to perform this same on each of the 32 sheets within the workbook.  I'll have to this for each month.  Can VBA or macro solution be delevloped to accomplish this routine tasking?  If so, how? FANG-DEC-2010-Breakdown.xlsx
0
Comment
Question by:Curt_Hasan
  • 2
3 Comments
 
LVL 11

Expert Comment

by:jkpieterse
ID: 34906734
I'd suggest to use just one report sheet, which uses formulas to extract the right information from your data to show the chart, see attached.
FANG-DEC-2010-BreakdownJKP.xlsx
0
 

Author Comment

by:Curt_Hasan
ID: 34906888
Your solution can possibly work.  However, how would you apply this solution to graphing each days data?
0
 
LVL 11

Accepted Solution

by:
jkpieterse earned 2000 total points
ID: 34907587
Not sure what you mean? Creating a printout of each day? That requires a tiny macro, such as:

Option Explicit

Sub PrintThisMonth()
    Dim lCt As Long
    Dim lDaysInMonth As Long
    Dim dDate As Date
    dDate = InputBox("Please enter a date in the month you want to report", , Format(Date, "yyyy/mm/dd"))
    lDaysInMonth = DateSerial(Year(dDate), Month(dDate) + 1, 0) - DateSerial(Year(dDate), Month(dDate), 1)
    For lCt = DateSerial(Year(dDate), Month(dDate), 1) To DateSerial(Year(dDate), Month(dDate), 1) + lCt
        With Worksheets("Sheet2")
            .Range("B3").Value = lCt
            .PrintOut preview:=True
        End With
    Next
End Sub
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question