ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find latest effective month and delete others (https://www.excelbanter.com/excel-programming/450198-find-latest-effective-month-delete-others.html)

B Roberson

Find latest effective month and delete others
 
I have downloaded out of our system the beginning of an operation that has proved to be very challenging already.

For a group of Properties/Wells in the State of Oklahoma, I have downloaded all the lists of owners that have royalty interests for these properties. Right now, I have about 26,000 owner records, and there are roughly 500 properties that contain these owners. The property number is listed on each of these property records as well as the effective year and month as detailed in the next paragraph.

Each owner's records contains a field that contains an effective year and month expressed in numeric format for example 201001 meaning January 2010.

The operation is to come up with the most recent list of ownership by well using the field Effective year and month(the aforementioned numeric field listed in the previous paragraph), extracted to a separate listing on a separate tab. I don't want to have to do this well by well.

I appreciate your help.





GS[_2_]

Find latest effective month and delete others
 
Have you tried doing a descending order Sort using your yearmonth field
as the sort key?

--
-
Garry

Free Usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion

B Roberson

Find latest effective month and delete others
 
Yes, I can do the sort the way you described, but you have to be able to copy out just the records with the latest Yearmonth within each Divord... That is what I am not able to figure out is that part


Have you tried doing a descending order Sort using your yearmonth field

as the sort key?



--

-

Garry



Free Usenet access at http://www.eternal-september.org

Classic VB Users Regroup!

comp.lang.basic.visual.misc

microsoft.public.vb.general.discussion



GS[_2_]

Find latest effective month and delete others
 
After you Sort you can Filter on just the latest, then copy/paste.

If you want to use a macro then just turn on the macro recorder and go
through the steps manually once, then turn of the macro recorder and
save the macro for future use.

--
-
Garry

Free Usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


All times are GMT +1. The time now is 12:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com