A
April
I need help writing some vb script.... In Column A, every
couple of rows I have a "Identifier" then a couple of
rows of names (Column B) and I need to write code that
will Start at A2 (Or Active Cell) and Do a Select
(xlDown), Offset (-1,0) (Up one Row) and CopyDown, then
select then next identifier and do it again until the
end. For example, Cell A2 to A4 will copy down what is in
A2, A5 to A26 will copy down what is on A5, A27 to A47
will copy down what is in A27.
I have this:
Do
ActiveCell.Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.Offset(-1, 0)).Select
Selection.FillDown
Selection.End(xlDown).Select
Loop
The only problem is the offset(-1,0) is not working
right. Say it has A5:A10 Selected, instead of changing
it to A5:A9 with the Offset(-1,0) it is changing it to
A4:A10 or A5:A11, how do I get it to offset up one row
(From the bottom of the select and not from the top).
April
couple of rows I have a "Identifier" then a couple of
rows of names (Column B) and I need to write code that
will Start at A2 (Or Active Cell) and Do a Select
(xlDown), Offset (-1,0) (Up one Row) and CopyDown, then
select then next identifier and do it again until the
end. For example, Cell A2 to A4 will copy down what is in
A2, A5 to A26 will copy down what is on A5, A27 to A47
will copy down what is in A27.
I have this:
Do
ActiveCell.Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.Offset(-1, 0)).Select
Selection.FillDown
Selection.End(xlDown).Select
Loop
The only problem is the offset(-1,0) is not working
right. Say it has A5:A10 Selected, instead of changing
it to A5:A9 with the Offset(-1,0) it is changing it to
A4:A10 or A5:A11, how do I get it to offset up one row
(From the bottom of the select and not from the top).
April