+ Reply to Thread
Results 1 to 4 of 4

VBA sum every 24h for the past 20 years!

  1. #1
    Forum Contributor
    Join Date
    05-05-2020
    Location
    Germany
    MS-Off Ver
    2013
    Posts
    100

    VBA sum every 24h for the past 20 years!

    Hi,

    please see the attached excel.

    I have a long data showing how much power is being produced every hour of a day for a whole year. I need to have the daily production, sum every 24h, and create the second table and then the third table which includes daily production over a year. I used
    Please Login or Register  to view this content.
    , however, I found a few errors while using it (e.g. the power produced in 30.12 was 0, which is impossible). I can't go threw all data to find the mistake because I have multiple tables similar to this one and need to analyse the power production in the past 20 years...

    Can someone help with this?

    in excel I only put the data for Jan. to Feb. 3rd.

    thanks
    Attached Files Attached Files
    Last edited by (T_T); 09-01-2022 at 01:46 PM.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: VBA sum every 24h for the past 20 years!

    I made a table of the data. => insert => table.


    With a formula to get the date.

    D2=DATE(YEAR(A2),MONTH(A2),DAY(A2))


    After that a pivot table.

    See the attached file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Contributor
    Join Date
    05-05-2020
    Location
    Germany
    MS-Off Ver
    2013
    Posts
    100

    Re: VBA sum every 24h for the past 20 years!

    Quote Originally Posted by oeldere View Post
    I made a table of the data. => insert => table.


    With a formula to get the date.

    D2=DATE(YEAR(A2),MONTH(A2),DAY(A2))


    After that a pivot table.

    See the attached file.
    Thanks, I will use this formula for the date. but the main issue is the daily power column. The formula I used doesn't give me the result I want.

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: VBA sum every 24h for the past 20 years!

    But my pivot table give you the total production on a day.

    And since you also want to know the production of each hour on a day I made that pivot table in another sheet.


    See the attached file.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Overview of past years income/expenses
    By MBaigent in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-20-2019, 04:17 PM
  2. Hello to all, I honestly have struggled alot in the past few years..
    By IV4N3O5 in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 10-17-2018, 11:05 AM
  3. [SOLVED] How to show Top 10 Cleints over the past 3 years
    By FrancisM2411 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-05-2016, 07:34 AM
  4. [SOLVED] Highlight the dates from given month and past years
    By pipsmultan in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 11-03-2015, 06:21 AM
  5. [SOLVED] Compare Past Years Data in Bar Chart?
    By Steveo555 in forum Excel General
    Replies: 3
    Last Post: 05-07-2012, 01:43 PM
  6. [SOLVED] How do I keep up with a monthly amount due from past years?
    By hotsytotsy79 in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 07-18-2005, 02:05 PM
  7. Dates For Past Years
    By scw1217 in forum Excel General
    Replies: 0
    Last Post: 02-15-2005, 08:00 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1