Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro question

I need help with first figuring out whether or not this is possible
and second writing the macro. I have a very large report, 13000
records. There are six columns: account #, name, birthdate, date of
visit, diagnosis, and location. There are many duplicate records.
For example, there may be ten records for Jane Doe. One record has a
date of visit of 10/12/2004 and nine records have a date of visit of
10/13/2004. I need to delete 8 of the nine records with the date of
10/13/2004. I then need to count the number of records with the same
account #. Is this possible?


Thanks in advance for all of your help!!!!

KrisG.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default Macro question



--
Patrick Molloy
Microsoft Excel MVP
---------------------------------
I Feel Great!
---------------------------------
"G-MAN" wrote in message
om...
I need help with first figuring out whether or not this is possible
and second writing the macro. I have a very large report, 13000
records. There are six columns: account #, name, birthdate, date of
visit, diagnosis, and location. There are many duplicate records.
For example, there may be ten records for Jane Doe. One record has a
date of visit of 10/12/2004 and nine records have a date of visit of
10/13/2004. I need to delete 8 of the nine records with the date of
10/13/2004. I then need to count the number of records with the same
account #. Is this possible?


Thanks in advance for all of your help!!!!

KrisG.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default Macro question

send me your sheet - say a few hundred rows & I'll return a solution.

Method : use a class to hold the account and date
use a scripting dictionary to hold the classes. A dictionary has an Exist
method on the keys so that you can easily check if a key exists
use Account number as the key.
the .count property of the class will indicate how many visits per a/c
there are.
Its quite simplistic & I'll post the code too.

regards

--
Patrick Molloy
Microsoft Excel MVP
---------------------------------
I Feel Great!
---------------------------------
"G-MAN" wrote in message
om...
I need help with first figuring out whether or not this is possible
and second writing the macro. I have a very large report, 13000
records. There are six columns: account #, name, birthdate, date of
visit, diagnosis, and location. There are many duplicate records.
For example, there may be ten records for Jane Doe. One record has a
date of visit of 10/12/2004 and nine records have a date of visit of
10/13/2004. I need to delete 8 of the nine records with the date of
10/13/2004. I then need to count the number of records with the same
account #. Is this possible?


Thanks in advance for all of your help!!!!

KrisG.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro question


Patrick, where can I find your email address so I can send the file to
you? My email address is gman3177 "at" yahoo.com

Thanks,
KrisG


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Reply
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
Macro Question David Excel Discussion (Misc queries) 3 April 30th 10 02:25 PM
Excel 2007 Macro/VB Question DDE Question MadDog22 Excel Worksheet Functions 1 March 10th 10 01:47 AM
Macro Question carl Excel Worksheet Functions 0 June 7th 06 06:14 PM
Question about macro Jason Excel Discussion (Misc queries) 0 April 27th 05 10:37 PM
question about the macro vb some one help? nader Excel Programming 3 July 31st 04 01:35 AM


All times are GMT +1. The time now is 07:55 AM.

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

About Us

"It's about Microsoft Excel"