Macro to autofill text help!

  • Thread starter Thread starter Marlene.Sawhney
  • Start date Start date
M

Marlene.Sawhney

Hello Everyone,

Just looking for a fairly simple macro (at least I think!)

I have column I and solumns J,K,L, and M. Here is what my data looks
like.

column I Column J Column K Column L
Column M
Advisors Inc 1 2
33 55
1 2
33 55
8 78
11 8787
15 25
303 4455
ABN 33 88
574 44
339 828
57454 344

I have a spreadsheet like this with about 2000 lines. Is there a way
to autofill in the data so that it copies whats in the first cell of
column I, until the next blank row and does that all the way down the
2000 columns? I need to sort a few things and it will make life
easier!

Thanks!
 
The layout of your post got distorted, but I think you are looking for
this solution from John Walkenbach (no macro required)...
http://j-walk.com/ss/excel/usertips/tip040.htm
"Duplicate repeated entries in a list"
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




<[email protected]>
wrote in message
Hello Everyone,
Just looking for a fairly simple macro (at least I think!)
I have column I and solumns J,K,L, and M. Here is what my data looks
like.

column I Column J Column K Column L
Column M
Advisors Inc 1 2
33 55
1 2
33 55
8 78
11 8787
15 25
303 4455
ABN 33 88
574 44
339 828
57454 344

I have a spreadsheet like this with about 2000 lines. Is there a way
to autofill in the data so that it copies whats in the first cell of
column I, until the next blank row and does that all the way down the
2000 columns? I need to sort a few things and it will make life
easier!
Thanks!
 
This will do what you want:

Range("B2").Select
Range(Selection, Selection.End(xlDown)).Select
Range("B4:B1000").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.FormulaR1C1 = "=R[-1]C"

You may have to change B2 to something else; this must be the first cell
with data in it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top