+ Reply to Thread
Results 1 to 8 of 8

Summing Query

  1. #1
    Registered User
    Join Date
    01-08-2014
    Location
    Leeds, West Yorkshire
    MS-Off Ver
    Excel 2010
    Posts
    14

    Summing Query

    Hi, I would be grateful for any assistance from one or more of the many Excel geniuses on here with something which has been driving me crazy! Copy S/S attached.

    Basically, I have a spreadsheet 4,000 lines long which is split by many differing Account Codes, Column C. I have used the Subtotal function to count the total records for each Account.

    I am trying to work out a way to further count and display the number of records within each separate Account Code using Column P ( Driver Code ) which equals "Palletline" or "Alternate" show the count for each and the % of the total number of records shown by the Subtotal function. I have tried to use the subtotal function further which just produces erratic results.

    I would need an easy way of applying the solution all the way down the spreadsheet with any change in Account Code.

    I have attached a smaller version of the actual spreadsheet and noted what I am trying to achieve in Red.

    It would be nice to have a grand totals at the end if possible but this is a luxury not a necessity.

    Many Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Summing Query

    In P63 try below
    =COUNTIF($P$2:$P$61,O63) and drag down to get the count of Palletline and Alternate (in O64 change alternative to Alternate)

    in Q63 try below =(S63/($S$63+$S$64))*100 and drag down to get %

    change the ranges accordingly in your subsequent formulas.
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,726

    Re: Summing Query

    Would the approach in the attached file be more flexible for you? i.e. to have a summary table in a separate sheet. Just add your account codes to column A of the summary sheet and copy the formulae in columns B to E further down as required. No need to sort the data, or to insert subtotals etc.

    Note that I've changed the entry in P72 of the main sheet - you had it as "Alternative".

    Hope this helps.

    Pete
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-08-2014
    Location
    Leeds, West Yorkshire
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Summing Query

    Thanks to you both ( Hemesh & Pete_UK ) for your responses both of which provided a solution. I used the summary sheet suggestion provided by Pete as this was the quickest & easiest way to produce figures for the 300+ customers over 4,000 lines, a very good idea. I wouldnt have come up with either solution unfortunately so many thanks to you both again. Very much appreciated.

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,726

    Re: Summing Query

    Glad to be able to help. I used to do things your way many years ago, until I discovered COUNTIF and SUMIF.

    If that takes care of your original question, please select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Also, since you are relatively new to the forum, I would like to inform you that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

  6. #6
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Summing Query

    You are welcome and Thanks for the feedback!

  7. #7
    Registered User
    Join Date
    01-08-2014
    Location
    Leeds, West Yorkshire
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Summing Query

    Hi Pete. I have marked the thread as Solved, I was told to do this from the start and I did also try and contact you both directly to thank you but it wouldnt let me. At the bottom left of the posts on my screen I have * Add Reputation & + Reply to Thread. On the R/H side I have Reply, I tried both replys and nothing happens, a circle just spins endlessly on my screen. The only way I can respond is to Quick Reply. I did ask one of the Administrators who couldnt provide a solution.

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,726

    Re: Summing Query

    The icon next to Add Reputation is Report Post - you only use this if you want to bring that post to the attention of the Moderators (for spam, bad language etc.) . The Reply buttons are both on the right. I think the Forum is running a bit slow at the moment, as I have had that spinning circle earlier - I just went to another site and then came back after a while.

    You can also contact members directly, either by leaving a visitor message or a Private Message - just click the Members name in the profile section on the left of a post.

    Other useful things you can do on the Forum are explained in the FAQ at the top of the screen.

    Thanks for the Rep.

    Pete

+ 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] Validation list summing query
    By alan peele in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-15-2014, 08:56 PM
  2. [SOLVED] Loop through list, perform web query and save each query on its own page
    By anrichards22 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-07-2012, 07:50 AM
  3. Problem with selecting range with in query table after query refresh
    By shooter in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-31-2012, 11:55 AM
  4. Web Query - Change a word in query to form a new query
    By scottymelloty in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2011, 04:13 AM
  5. Summing Columns-revolves around summing particular items
    By savv32 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-06-2005, 09:05 PM

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