Formual: Find the Cell Criteria

Macpop

New Member
Joined
Aug 20, 2014
Messages
14
Good Day,

I am trying to decipher a formula that will check in a range of cells to determine if a cell criteria has the identical values in two separate cells.

See example:

Company

<tbody>
[TD="class: xl65, width: 78"] Debit
[/TD]
[TD="class: xl65, width: 105"] Credit [/TD]

[TD="class: xl66"]BX, INC[/TD]
[TD="class: xl67, align: right"]$0.00[/TD]
[TD="class: xl67, align: right"]$1,500.00 [/TD]

[TD="class: xl66"]LX, INC[/TD]
[TD="class: xl67, align: right"]$0.00[/TD]
[TD="class: xl67, align: right"]$28,293.68[/TD]

[TD="class: xl66"]FX, INC[/TD]
[TD="class: xl67, align: right"]$0.00[/TD]
[TD="class: xl67, align: right"]$23,257.00[/TD]

[TD="class: xl66"]BX, INC[/TD]
[TD="class: xl67, align: right"]$1,500.00[/TD]
[TD="class: xl67, align: right"]$0.00 [/TD]

[TD="class: xl66"]LX,INC[/TD]
[TD="class: xl67, align: right"]$28,293.68[/TD]
[TD="class: xl67, align: right"]$0.00 [/TD]

</tbody>

So in this example the formula should mark company BX,INC and company LX,INC as the companies that have both a credit and debit amount. Where as company LX, INC and FX, INC do not have both a credit and debit amount.

In addition, the formula should be able to identify pairs. So if BX, INC appeared with another 1500 credit balance and no debit balance of 1500, then the formula would not mark that cell.

I think there is a formula for this. Any assistance will be valuable.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
here you go... assuming your data is starting at A1 through column C. Input this into cell D2 and drag down.

Code:
=IF(SUMIF($A$2:$A$6,A2,$C$2:$C$6)=SUMIF($A$2:$A$6,A2,$B$2:$B$6),"Deb&Cred","")

Adjust the ranges as needed
 
Upvote 0
here you go... assuming your data is starting at A1 through column C. Input this into cell D2 and drag down.

Code:
=IF(SUMIF($A$2:$A$6,A2,$C$2:$C$6)=SUMIF($A$2:$A$6,A2,$B$2:$B$6),"Deb&Cred","")

Adjust the ranges as needed

Awesome! this works... Thank you :)
 
Upvote 0
In addition, the formula should be able to identify pairs. So if BX, INC appeared with another 1500 credit balance and no debit balance of 1500, then the formula would not mark that cell.
Awesome! this works... Thank you :)
Does that mean you don't want the two green rows below paired?

Excel Workbook
ABCD
1CompanyDebitCredit
2BX, INC0.001,500.00 
3LX, INC0.0028,293.68Deb&Cred
4FX, INC0.0023,257.00
5BX, INC1,500.000.00
6LX, INC28,293.680.00Deb&Cred
7BX, INC0.001,500.00
Matching Values
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,906
Members
452,366
Latest member
TePunaBloke

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