Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-14-2022, 06:39 AM
fluis fluis is offline Summing various rows of criteria match Mac OS X Summing various rows of criteria match Office 2016 for Mac
Banned
Summing various rows of criteria match
 
Join Date: Apr 2022
Posts: 1
fluis is on a distinguished road
Default Summing various rows of criteria match

I am trying to calculate collections (payment/charges) but the payments and charges are not on the same row. To circumvent that problem, I tried to create a formula essentially stating "if unique id, Item number and date of purchase match, divide the sum of payments by the sum of charges”, but formula didn’t work.



What is the best way to calculate this?
Reply With Quote
  #2  
Old 04-16-2022, 12:57 PM
Purfleet Purfleet is offline Summing various rows of criteria match Windows 10 Summing various rows of criteria match Office 2019
Expert
 
Join Date: Jun 2020
Location: Essex
Posts: 345
Purfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to behold
Default

Quote:
Originally Posted by fluis View Post
I am trying to calculate collections (payment/charges) but the payments and charges are not on the same row. To circumvent that problem, I tried to create a formula essentially stating "if unique id, Item number and date of purchase match, divide the sum of payments by the sum of charges”, but formula didn’t work.

What is the best way to calculate this?
please post an example worksheet, so we can see what the data looks like
Reply With Quote
  #3  
Old 04-17-2022, 12:01 AM
ArviLaanemets ArviLaanemets is offline Summing various rows of criteria match Windows 8 Summing various rows of criteria match 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 easiest way is to start with defining your table as Table - so you don't have to bother defining any ranges of data. Let's assume you defined a Table EntryRows, which has columns like EntryID, EntryType, EntryDate, ItemNo, RowSum, Collection.
(I used Entry instead of Payment, as it looks like you'll have in same Table payment rows, and charge rows - whatever the last one are. Let's assume all payments have a Type 1, and all charges a Type 2.)


The formula for Collection will be like:
Code:
=SUMIFS([RowSum],[EntryID],[@EntryID],[EntryDate], [@EntryDate], [ItemNo], [@ItemNo],[EntryType],1)/SUMIFS([RowSum],[EntryID],[@EntryID],[EntryDate], [@EntryDate], [ItemNo], [@ItemNo],[EntryType],2)
NB! When the formula is used in Table EntryRows, the formula repeats the same value for every row with same set of conditions! When you want to get a single row as result, you must have a separate table or report, where all conditions are set. Table column references to separate Table used there must there be in format [TableName[ColumnName]].

NB! When you don't use Tables, you have to replace Table references with regular ones, i.e. instead of [TableName[ColumnName]] you have to use SheetName!$Column$StartRow:$Column$EndRow, with Column like A, and StartRow and EndRow like 2 and 10. A Table reference preceeded with @ refers to value in same row.
And be sure all ranges referenced in SUMIF formula are of same dimension!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Summing various rows of criteria match Add criteria to MAX INDEX MATCH ollyhughes Excel 2 02-25-2022 03:38 AM
Summing various rows of criteria match Formula that looks at more than one criteria and then adds up those that match DazzyBee Excel 2 01-20-2017 11:29 PM
Summing various rows of criteria match Create a unique list of values that match a criteria, sorted in order of another criteria BradRichardson Excel 2 01-03-2017 12:25 AM
Using a VLOOKUP - when 2 rows match criteria it returns the first value in the cel only how 2 change djrobst Excel 4 10-28-2015 01:32 AM
Summing various rows of criteria match Count unique values that match 2 or more criteria caeiro01 Excel 1 10-25-2015 02:34 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:57 PM.


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