M
Math
I have a database download that always comes in a frustrating format.
It's effectively outlined, eg. rather than having field names as
column headers and record going down, it has (using as simple an
example as I can describe) the record-ID in A2, Field "A" Name in B2,
Field "A" value in C2, then Field "B" Name in B3, Field "B" Value in
C3, etc. There can be any number of fields in the list (it only
downloads the fields with values), but only the one record-ID at the
top left. After the last field, there's a blank row before the next
record starts.
Anyway, ideally I'd like to macro this up to put the field names as
column headers and then one record per row, but currently that's way
above me.
For now, I'd like help with a simple macro that copies the record-ID
down into every row applicable to that record.
- From the active cell
- find the next non-blank cell (i'm guessing with a loop using
IsEmpty)
- define a range from the active cell down to the next non-blank cell-
minus 2 (because of the blank line)
- Autofill that range with the original activecell's value
- select the next nonblank cell and repeat
Any help would be appreciated.
(getting things back into the original format in order to upload is a
problem I don't even want to consider at the moment!)
Many thanks
It's effectively outlined, eg. rather than having field names as
column headers and record going down, it has (using as simple an
example as I can describe) the record-ID in A2, Field "A" Name in B2,
Field "A" value in C2, then Field "B" Name in B3, Field "B" Value in
C3, etc. There can be any number of fields in the list (it only
downloads the fields with values), but only the one record-ID at the
top left. After the last field, there's a blank row before the next
record starts.
Anyway, ideally I'd like to macro this up to put the field names as
column headers and then one record per row, but currently that's way
above me.
For now, I'd like help with a simple macro that copies the record-ID
down into every row applicable to that record.
- From the active cell
- find the next non-blank cell (i'm guessing with a loop using
IsEmpty)
- define a range from the active cell down to the next non-blank cell-
minus 2 (because of the blank line)
- Autofill that range with the original activecell's value
- select the next nonblank cell and repeat
Any help would be appreciated.
(getting things back into the original format in order to upload is a
problem I don't even want to consider at the moment!)
Many thanks