Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-01-2023, 01:09 PM
wheddingsjr wheddingsjr is offline The correct formula Windows 7 64bit The correct formula Office 2016
Advanced Beginner
The correct formula
 
Join Date: Mar 2017
Posts: 76
wheddingsjr is on a distinguished road
Default The correct formula

Hi all



I have a long list of items with a dollar amount. Many of the items has the same number and I want to get a total of each group. I have tried a few formulas but they dont seem to match. Please see the attachment to see what I am trying to do. This list is extremely long and I would rather not have to do this manually.

Thanks
Attached Files
File Type: xlsx Book2.xlsx (9.7 KB, 5 views)
Reply With Quote
  #2  
Old 05-02-2023, 12:17 AM
ArviLaanemets ArviLaanemets is offline The correct formula Windows 8 The correct formula Office 2016
Expert
 
Join Date: May 2017
Posts: 873
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default

The formula you need to enter into cell D2 and then copy down is like (You have to edit the ranges when you have more or less rows in table. And be sure you have proper absolute/relative references used.):
Code:
=SUMIFS($C$2:$C$22,$B$2:$B$22,$B2)
The formula returns group total for every member row of group. It is possible to modify it so so group total is returned for only one row in every group, but instead I advice to have a sheet where all [BU ID]'s are registered, and add there a column with my formula. An added bonus is, you can use this table as source for Data Validation List in [BU ID] column in your table (by default, Data Validation List allows to enter/select only values present in it's source).

If you use defined Table instead regular one, the same formula will be something like
Code:
When used in same Table:
=SUMIFS([Payment Date],[BU ID],@[BU ID])

When used in Table where [BU ID]'s are registered:
=SUMIFS(YourPaymentsTable[[Payment Date]],YourPaymentsTable[[BU ID]],@[BU ID])

When you drop using spaces in your table headers (e.g. having headers like PaymentDate and BUID instead, e.g. the last formula simplifies as:
=SUMIFS(YourPaymentsTable[PaymentDate],YourPaymentsTable[BUID],@BUID)
An added bonus using defined Tables is, the formulas are adjusting automatically whenever any rows are added/removed. The only limiting condition for making this work is, that the whole column must have this (and only this) formula!
Reply With Quote
  #3  
Old 05-02-2023, 06:46 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is online now The correct formula Windows 10 The correct formula Office 2021
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,777
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Or a nice and simple pivot table after making an Excel Table out of your range ( I added a dates field just in case)
To update, add rows - refresh - you're OK to go
Attached Files
File Type: xlsx Book2.xlsx (15.2 KB, 2 views)
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #4  
Old 05-02-2023, 09:17 AM
wheddingsjr wheddingsjr is offline The correct formula Windows 7 64bit The correct formula Office 2016
Advanced Beginner
The correct formula
 
Join Date: Mar 2017
Posts: 76
wheddingsjr is on a distinguished road
Default

Thanks Arvi
Reply With Quote
  #5  
Old 05-02-2023, 09:19 AM
wheddingsjr wheddingsjr is offline The correct formula Windows 7 64bit The correct formula Office 2016
Advanced Beginner
The correct formula
 
Join Date: Mar 2017
Posts: 76
wheddingsjr is on a distinguished road
Default

Thanks Peco

This worked perfectly!! Not sure why I didn't think of this. It never crossed my mind that I could do a pivot table to solve this quick and easy....
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
The correct formula Looking for the correct formula wheddingsjr Excel 6 09-10-2019 04:10 AM
The correct formula Possible to use an existing vlookup formula to also insert correct info and trigger a SUM formula innkeeper9 Excel 2 09-13-2016 08:59 PM
The correct formula Creating formula based on if data is correct in cell MattMurdock Excel 1 08-06-2012 03:11 AM
The correct formula Can't get formula to recognize correct data cklassen Excel 1 05-19-2012 01:25 AM
The correct formula Cross-reference together with Mathtype formula is not working correct Santa_Clause Word 2 02-02-2010 04:37 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:27 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft