Delete items whwre the debit and credit value and ref matches

howard

Well-known Member
Joined
Jun 26, 2006
Messages
6,603
Office Version
  1. 2021
Platform
  1. Windows
I have ref numbers in Col A and values in Col B


where the debit and credit values match within one row of each other and the ref no. is the same or the ref contains the text Reverse in the aame row as the credit value, then the rows containing these items are to be deletes for eg B2 is 100 and B3 is -100 and the ref A2 is KB-965 and A3 is either KB-9654 or contains text reverse then these rows are to be deleted



It would be appreciated if someone could provide me with code to do this




See sample data below-The rows in yellow are to be deleted



Book1
AB
1RefValue
2KL-8030762-98,707.98
3KL-803076298,707.98
4KL-8030763-92,105.26
5KL-803076392,105.26
6KL-8035136,842.11
7KL-803886,956.52
8KL-8039360,989.20
9REVERSE ITEM-360,989.20
10
Sheet1
 
Last edited:

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

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