Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
296 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 500 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

829 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