Greetings,
I usually hang out over in the MS Access forum area, but I have to segway over to Excel for my current problem.
I have a number of spreadsheets (200+) which I must clean up (for lack of a better word) so that I can import it into my MS Access database.
My office is in the process of going through years' worth of data in spreadsheet form and getting it into a database for easier querying, etc...
Anyway... my problem is this:
* The spreadsheets are created from an automated system, the format of which is dictated by a higher authority, and I cannot request a change to the format
* The first column of the spreadsheet (TAC) is not fully populated... in other words, if the first 15 rows are associated with a particular TAC, the TAC is listed in the first record, and the remainder are blank until the next series of records with a new TAC appears (this'll make much more sense if you look at the attachment)
* Before I can import it into my database, I need to copy the TAC down through column A until I hit a new TAC.
* So far, I've been highlighting the applicable area, hitting CTRL-D, to copy it down, and then moving along.
This takes WAAAY too long.
The spreadsheet I uploaded is a small fraction of a "real" spreadsheet. The real ones have around 15-20K rows and 20-30 TAC's on each. And I've got around 200 spreadsheets to do.
This seems like it should be easy, and although I'm fairly handy with VBA in Access, today is my first foray into Excel
VB. Needless to say, it's not going well.
My rough
VB pseudo code is below....Think I'm on the right track, but obviously my syntax is pretty much imaginary at this point... If someone could point me in the right direction, I'd be very appreciative!
Sub Copy_TAC()
Dim CurCell As Object
For Each CurCell In Selection
' If the cell below the current cell is blank
' then copy the data to the cell below it
' else skip to the next cell
' endif
Next
End Sub
Thanks for any assistance!
-Dean (a.k.a. Friz)