Help with matching data in two columns with a control number

jmujjf

New Member
Joined
Aug 4, 2015
Messages
12
Hello,

I am hoping someone can assist me with figuring out a formula that can add a flag in a "NoMatch" type column as displayed below based on a similar set of data. The purpose is to identify where a particular ID has a debit without a matching credit. I assume the fact that the ID can be used more than twice makes this even more complicated but I am hoping someone has encountered a problem like this before. Thank you in advance for any assistance you can provide.

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Debit[/TD]
[TD]Credit[/TD]
[TD]NoMatch[/TD]
[/TR]
[TR]
[TD]1234[/TD]
[TD]25[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1234[/TD]
[TD][/TD]
[TD]25[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1234[/TD]
[TD]25[/TD]
[TD][/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]1235[/TD]
[TD]100[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1235[/TD]
[TD][/TD]
[TD]100[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1236[/TD]
[TD]75[/TD]
[TD][/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]1237[/TD]
[TD]65[/TD]
[TD][/TD]
[TD]X[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
I've been brainstorming trying to determine a way to do this. Maybe it isn't even possible using a formula? Is there any other way I might not have considered that would enable me to easily manipulate the data? The end goal would be to determine the ID number and associated total credit balance if the Debit side equals 0. Also, upon a second look at the data my example should probably look more like:

[TABLE="class: cms_table_grid, width: 500"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Debit[/TD]
[TD]Credit[/TD]
[TD]NoMatch[/TD]
[/TR]
[TR]
[TD]1234[/TD]
[TD]25[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1234[/TD]
[TD][/TD]
[TD]25[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1235[/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1235[/TD]
[TD][/TD]
[TD]75[/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]1237[/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1237[/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1237[/TD]
[TD][/TD]
[TD]65[/TD]
[TD]X[/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:
Upvote 0
Hi,

Your requirements are unclear to me...just a guess here:


Book1
ABCDEF
1IDDebitCreditNoMatch
2123425   
3123425
412350XX
5123575XX
6123735
7123730
8123765
912380XX
1012381X
11123850XX
Sheet270
Cell Formulas
RangeFormula
D2=IF(SUMIF(A$2:A$11,A2,B$2:B$11)=SUMIF(A$2:A$11,A2,C$2:C$11),"","X")
E2=IF(COUNTIF(A$2:A2,A2)=COUNTIF(A$2:A$11,A2),IF(SUMIF(A$2:A$11,A2,B$2:B$11)=SUMIF(A$2:A$11,A2,C$2:C$11),"","X"),"")
F2=IF(COUNTIF(A$2:A2,A2)=1,IF(SUMIF(A$2:A$11,A2,B$2:B$11)=SUMIF(A$2:A$11,A2,C$2:C$11),"","X"),"")


D2 formula will Flag All rows for IDs with No Match
E2 formula will Flag Last instance of IDs with No Match
F2 formula will Flag First instance of IDs with No Match

Formulas copied down.

Again, I'm Not even sure I understand your requirements.
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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