Hi,
Just bought the book on Friday. I'm trying to streamline the process of cutting and pasting. It seems that a macro with a do while loop would do the trick; first, however, I need to be able to filter and copy data into a different worksheet within the same spreadsheet.
An example on page 307 of the book looks like a homerun, but I keep receiving databug errors on either of the following two fields:
rnStart.AutoFilter Field:=1, Criteria1:="AA" & i
rnData.SpecialCells(xlCellTypeVisible).Copy
For my Macro, my "Article" heading is "Asset Class." Assets are either 1PV1PD, 1PV2NP, 1PV4UD, and 1PV5OT. To simplify, I changed their names to be 1PV1, 1PV2, 1PV3, and 1PV4.
So like the example in the book, I had a similar filter criterion:
rnStart.AutoFilter Field:=1, Criteria1:="1PV" & i
Still, there is a bug.
All I'm trying to do is pull oil and gas data from a field run and separate it by class (e.g., Proved Developed Producing, Proved Developed Non-Producing, Proved Undeveloped) into a different spreadsheet in the same file.
Originally, I thought a simple VLOOKUP table would do the trick, however, the date column has to be in ascending order throughout the data range. For the data I have, it's ascending up until the class changes, i.e., for PDP data, I have 1/31/06 numbers thru 7/31/08. The next row begins with the PDNP data and starts over at 1/31/06.
Thanks in advance for any help that can be provided.
Best,
Just bought the book on Friday. I'm trying to streamline the process of cutting and pasting. It seems that a macro with a do while loop would do the trick; first, however, I need to be able to filter and copy data into a different worksheet within the same spreadsheet.
An example on page 307 of the book looks like a homerun, but I keep receiving databug errors on either of the following two fields:
rnStart.AutoFilter Field:=1, Criteria1:="AA" & i
rnData.SpecialCells(xlCellTypeVisible).Copy
For my Macro, my "Article" heading is "Asset Class." Assets are either 1PV1PD, 1PV2NP, 1PV4UD, and 1PV5OT. To simplify, I changed their names to be 1PV1, 1PV2, 1PV3, and 1PV4.
So like the example in the book, I had a similar filter criterion:
rnStart.AutoFilter Field:=1, Criteria1:="1PV" & i
Still, there is a bug.
All I'm trying to do is pull oil and gas data from a field run and separate it by class (e.g., Proved Developed Producing, Proved Developed Non-Producing, Proved Undeveloped) into a different spreadsheet in the same file.
Originally, I thought a simple VLOOKUP table would do the trick, however, the date column has to be in ascending order throughout the data range. For the data I have, it's ascending up until the class changes, i.e., for PDP data, I have 1/31/06 numbers thru 7/31/08. The next row begins with the PDNP data and starts over at 1/31/06.
Thanks in advance for any help that can be provided.
Best,