LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 157
Default Macro to delete rows with matching Credits and Debits

I have posted on this website once before about a problem I am having trying
to create a macro that will delete accounts with credits and debits of the
same amount. I never could get the macros to work that I was given to try,
so since this has been a while ago, thought I'd try again. Going to try to
make it as simple as I can. I have a report in Excel, contains the following
information:
A B C D E F G
H I
Room#/PatientNo/Patient Name/CNSDay/#Days/F_C/HSV/QTY/AMT

In these columns is patient information that is updated daily, and changes
daily. It is showing patients that are charged room charges, and sometimes
the room charges are wrong, so are credited back to that patient account, and
sometimes the correct one is added on. I have been manually going in and
deleting the credits and debits, and need to find a way to do this with a
macro. Below is shown an example of data in the report, and which ones would
be deleted. Sorry if this is a little long, but need to show different
scenarios. The asterisks to the side show which rows would be deleted. I
sort by PatientNo, CNSDay and AMT, if there is a debit and credit for the
same patient, same CNSDay and same amount, it gets deleted. Hope this makes
sense, I need help badly, this is taking so much time to do it manually every
day since this report can contain as many as 1000 or more patient listings at
a time. Thanks in advance for your assistance!!!

A B C D E F G
H I
Room#/PatientNo/Patient Name/CNSDay/#Days/F_C/HSV/QTY/ AMT
1502 2000000 John Doe 1 15 M MIP 1
1,044.74
1502 2000000 John Doe 2 15 M MIP (1)
(1,044.74) *
1502 2000000 John Doe 2 15 M MIP 1
1,023.75
1502 2000000 John Doe 2 15 M MIP 1
1,044.74 *
1502 2000000 John Doe 3 15 M MIP (1)
(1,044.74) *
1502 2000000 John Doe 3 15 M MIP 1
1,023.75
1502 2000000 John Doe 3 15 M MIP 1
1,044.74 *
1621 2000001 Joe Schmoe 9 13 N SWG (1)
(1,023.75) *
1621 2000001 Joe Schmoe 9 13 N SWG 1 457.07
1621 2000001 Joe Schmoe 9 13 N MIP 1
1,023.75 *
1751 2000002 Sandy Box 7 7 MG SWG (1)
(1,371.22) *
1751 2000002 Sandy Box 7 7 MG ICU 1
1,371.22 *
1760 2000003 Anne Ride 1 4 H MIP 1
1,023.75
1760 2000003 Anne Ride 2 4 H MIP 1
1,023.75
1071 2000004 Ed Crumply 7 1 F SIP (1)
(708.93) *
1071 2000004 Ed Crumply 7 1 F SIP 1
708.93 *
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete BOTH sets duplicate data in columns (debits/credits) Iamconstance Excel Worksheet Functions 1 June 12th 09 04:13 PM
Using Sumif with debits & credits Carol@Bell Excel Discussion (Misc queries) 3 June 14th 07 11:38 PM
vertical lines between credits and debits Carolyn New Users to Excel 1 March 28th 06 05:23 AM
debits and credits in one column childothe1980s Excel Programming 2 February 2nd 06 04:18 PM
incrementing rows for matching debits/credits childofthe1980s Excel Programming 2 June 25th 05 08:04 PM


All times are GMT +1. The time now is 09:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"