summarize field comparisons, by count, with formula

craigexcel

Active Member
Joined
Jun 28, 2006
Messages
295
Office Version
  1. 2016
Platform
  1. Windows
I am working with some payroll data, where one field is a direct download of HR system data, and the comparator field was derived from some other related data.
My goal is to be able to use a formula (i.e. no helper Column(s)) that will summarize the differences between the 2 fields, such that those values with a +- difference of $0.01 can be assumed to be rounding differences, and all others can be assumed to be 'not a match'. Further, I'd like to be able to change a parameter in the formula that increases the $0.01 threshold, to see the effect of how many more 'matches' there would be by increasing that threshold.
In the attached, Columns D:H have formulas, and I manually entered "MATCH" in Column I where the differences would be considered a 'match' at the $0.01 threshold.
Increasing the threshold parameter to $0.03 would then find 3 'matches'.
I want to be able to share with the requestor the scale of 'matches' based on the threshold parameter

I've tried numerous iterations & combinations of IF, COUNT, COUNTIF, SUMPRODUCT, and maybe some others, but all without success.
I'd appreciate any suggestions for a formula (again, ideally, without helper columns), or a different approach to achieve this analysis.

payroll matched values - COUNT by criteria.xlsx
ABCDEFGHI
1actual valuesROUNDed values (displayed with 2 dec places)delta - actual values: Field1 vs Field2delta - ROUNDed & displayed to 2 dec places
2Field1Field2Field1Field2
315.265415.2715.2715.27(0.004600)-
49.341089.349.349.340.001080-
512.112812.112.1112.100.0128000.01MATCH
620.220.20120.2020.20(0.001000)-
74.6995.344.705.34(0.641000)(0.64)
818.418.418.4018.40--
914.55514.5514.5614.550.005000-
1010.2514.610.2514.60(4.350000)(4.35)
1111.19.8611.109.861.2400001.24
1216.416.4316.4016.43(0.030000)(0.03)
134.24.214.204.21(0.010000)(0.01)MATCH
Sheet1
Cell Formulas
RangeFormula
D3:E13D3=ROUND(A3,2)
G3:G13G3=A3-B3
H3:H13H3=ROUND(G3,2)
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
How about
+Fluff 1.xlsm
ABCD
10.01
2Field1Field2
315.265415.27Match
49.341089.34Match
512.112812.1Match
620.220.201Match
74.6995.34 
818.418.4Match
914.55514.55Match
1010.2514.6 
1111.19.86 
1216.416.43 
134.24.21Match
14
Main
Cell Formulas
RangeFormula
D3:D13D3=IF(ROUND(ABS(A3-B3),2)<=$D$1,"Match","")
 
Upvote 0
Thanks for your reply, Fluff. That would work in what I would consider an interim solution. To be sure, though, I didn't adequately elaborate on what I'd like my 'summary to look like. I knew I'd overlook something. :(
Reattaching a revised snapshot, with just simple COUNTIF formulas in [K2:L3].
What I'm angling for, is the 'summary' in [K2:L3], without a column that finds which records are a match and which are not. Hope that is a bit more clear.

payroll matched values - COUNT by criteria.xlsx
ABCDEFGHIJKL
1actual valuesROUNDed values (displayed with 2 dec places)delta - actual values: Field1 vs Field2delta - ROUNDed & displayed to 2 dec places
2Field1Field2Field1Field2MATCH2
315.265415.2715.2715.27(0.004600)-no matchno match9
49.341089.349.349.340.001080-no match
512.112812.112.1112.100.0128000.01MATCH
620.220.20120.2020.20(0.001000)-no match
74.6995.344.705.34(0.641000)(0.64)no match
818.418.418.4018.40--no match
914.55514.5514.5614.550.005000-no match
1010.2514.610.2514.60(4.350000)(4.35)no match
1111.19.8611.109.861.2400001.24no match
1216.416.4316.4016.43(0.030000)(0.03)no match
134.24.214.204.21(0.010000)(0.01)MATCH
Sheet1
Cell Formulas
RangeFormula
D3:E13D3=ROUND(A3,2)
G3:G13G3=A3-B3
H3:H13H3=ROUND(G3,2)
L2L2=COUNTIF(I3:I13,"MATCH")
L3L3=COUNTIF(I3:I13,"no match")
 
Last edited:
Upvote 0
Why do you consider there are only 2 matches, when there are 8 that meet the criteria of less then or equal to .01 difference?
 
Upvote 0
A fair (and accurate) point, tho I count only 7 (from the perspective of a $0.01 threshold; 8 matches @ <= $0.03). At any rate, attaching a modified snapshot.
And again, what I'm angling for is a 'summary' formula, that can do the match between the 2 fields, AND, then summarize (i.e. count) those cells in the range that are a match and those that are not.
payroll matched values - COUNT by criteria.xlsx
ABCDEFGHIJKL
1actual valuesROUNDed values (displayed with 2 dec places)delta - actual values: Field1 vs Field2delta - ROUNDed & displayed to 2 dec places
2Field1Field2Field1Field2MATCH7
315.265415.2715.2715.27(0.004600)-MATCHno match4
49.341089.349.349.340.001080-MATCH
512.112812.112.1112.100.0128000.01MATCH
620.220.20120.2020.20(0.001000)-MATCH
74.6995.344.705.34(0.641000)(0.64)no match
818.418.418.4018.40--MATCH
914.55514.5514.5614.550.005000-MATCH
1010.2514.610.2514.60(4.350000)(4.35)no match
1111.19.8611.109.861.2400001.24no match
1216.416.4316.4016.43(0.030000)(0.03)no match
134.24.214.204.21(0.010000)(0.01)MATCH
Sheet1
Cell Formulas
RangeFormula
D3:E13D3=ROUND(A3,2)
G3:G13G3=A3-B3
H3:H13H3=ROUND(G3,2)
L2L2=COUNTIF(I3:I13,"MATCH")
L3L3=COUNTIF(I3:I13,"no match")
 
Last edited:
Upvote 0
Try:
Vendor Bid Analys Summary (1).xlsm
ABCDE
10.01
2
315.265415.27MATCH4
49.341089.34No MATCH1
512.112812.1
620.220.201
74.6995.34
Sheet2
Cell Formulas
RangeFormula
E3E3=SUMPRODUCT(--(ABS(ROUND(A3:A7,2)-B3:B7)<=$C$1))
E4E4=COUNT(A3:A7)-E3
 
Upvote 0
Solution
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
bebo02199 -- Thanks for your reply, too. That did the trick.
Thanks again to Fluff for getting things started with your suggestion.
Appreciate both of your replies.
And Fluff, thanks for the reminder about updating my profile. Admittedly, I'm sure I'm behind on that, and since I haven't posted in some time, I did neglect to mention those details in my OP. Updating that next.
 
Upvote 0
Glad we could help & thanks for updating your profile.
 
Upvote 0

Forum statistics

Threads
1,214,987
Messages
6,122,614
Members
449,090
Latest member
vivek chauhan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top