+ Reply to Thread
Results 1 to 4 of 4

Calculating weekly totals with a variable number of items per week

  1. #1
    Registered User
    Join Date
    12-29-2018
    Location
    North East England, UK
    MS-Off Ver
    2019
    Posts
    12

    Calculating weekly totals with a variable number of items per week

    Hi, first post and hopefully it's in the correct sub-forum - apologies if not

    I'm trying to create a ledger sheet for a company I do consultation work for that matches their existing ledger sheet, hence the layout in the screenshot below

    Pretty simple sum formulas at the top of each column under the dark green headings but a desirable function of the sheet as it's filled out throughout the year is to have a weekly total

    Each row entry represents a payment into the business. Unfortunately, there will be a different number of payments every week.

    I've thought that this could be implemented by having a wk no. column and for every payment in, as long as the week number that the payment was made was filled in, that could be used to sum the various payment values for that week number.

    As per the screen you can see I've thought about using a drop down in the cell titled Sel. Week, and directly below this once the week is selected, the total for that week would be displayed.

    I'm by no means a regular Excel user though so I thought I'd ask if anyone could give me some pointer steps towards achieving this

    Any help is appreciated, thanks

    Capture.PNG

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: Calculating weekly totals with a variable number of items per week

    Welcome to the forum!

    Are you really looking for a VBA solution, or something using formulae?

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    12-29-2018
    Location
    North East England, UK
    MS-Off Ver
    2019
    Posts
    12

    Re: Calculating weekly totals with a variable number of items per week

    Thank you,

    So as regards VBA or formula; I guess I'm trying to keep it as simple as possible so formula as a preference but I assumed for this VBA would be required.

    I've attached the file I'm working on, all sample data is representative as far as is required and I've shown how I would like it to display as requested

    Hopefully this should be clearer now

    Thanks,
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,546

    Re: Calculating weekly totals with a variable number of items per week

    Here is an example of how you might set up what you want.
    A list of week numbers populates XFD2:XFD53
    Cell B2 is populated using data validation with the list as the source
    Cell B3 is populated using: =SUMPRODUCT((A8:A30=B3)*(D8:H30))
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. Group Weekly Data with Totals for that Week VBA - Group by Date
    By CHRISOK in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-27-2017, 11:50 AM
  2. Calculating totals based on week numbers
    By [email protected] in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-19-2017, 08:14 AM
  3. Replies: 11
    Last Post: 08-12-2015, 01:38 PM
  4. Calculating totals of combinations of items
    By kevmac27 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-20-2015, 07:57 AM
  5. Replies: 8
    Last Post: 06-21-2013, 04:35 PM
  6. Calculating totals for items with associated quantities over multiple rows
    By drewship in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-04-2009, 01:26 PM
  7. Replies: 1
    Last Post: 08-23-2005, 11:42 AM

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