Delete items whwre the debit and credit value and ref matches

howard

Well-known Member
Joined
Jun 26, 2006
Messages
6,595
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

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,223,898
Messages
6,175,274
Members
452,628
Latest member
dd2

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