Thread: [Solved] Group IDs, calculate
View Single Post
 
Old 03-29-2017, 05:55 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,382
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Getting the amounts for each provider is as simple as:
=SUMIF(A2:A20,A2,J2:J20)
where 20 is the last data row. Note that this does not require the data to be sorted.

Doing the same for the units is equally straightforward. What is not apparent from your post is whether the 24 is to be deducted from each provider's unit count or only the ones for whom there is a unit value of 24, or if the deductible varies by provider.

For provider 001, the formula is:
=(SUMIF(A2:A20,A2,J2:J20)/SUMIF(A2:A20,A2,I2:I20))*(SUMIF(A2:A20,A2,I2:I20)-24)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote