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
266 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now