Copy down

edsjr

New Member
Joined
Mar 27, 2002
Messages
33
I have a large spreadsheet (over 20k rows), in column a there is a company name and then many empty rows next to it. I need something that will fill down until it gets to a new name and then fill down again. see example, column a is original and i need it to be like column b

thanks in advance

Ed.

PS, I can't post attachment....how do I do that?

Here is a link to the file https://1drv.ms/x/s!AlMKyRBHlUsBgcgCRG-tFLFp64rdNg
 
Last edited:

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
How about
Code:
Sub edsjr()
   With Range("A1", Range("B" & Rows.Count).End(xlUp).Offset(-1))
      .SpecialCells(xlBlanks).FormulaR1C1 = "=r[-1]c"
      .Value = .Value
   End With
End Sub
This site does not allow members to upload files. You either upload to a share site, or you can use one of the add-ins available here to post data direct to the thread https://www.mrexcel.com/forum/about-board/508133-attachments.html
 
Upvote 0
I get a runtime error everytime I do it

I'll admit, I don't know much about macros

I threw the sample file on my onedrive account and made it shareable, link in original post
 
Last edited:
Upvote 0
Hi,

1. For your sample, at the Very Last cell in Column A where you want the copy to STOP (i.e. A43), enter Any Value ( i.e. "Stop" )
2. Enter this formula in A2,
=A1
Click Enter, select A2, right click, Copy
3. Select Column A, hit F5, click "Special", Check "Blanks", click "OK"
4. Hit Ctrl and V

You're done.

Delete the value in A43 if desired.
 
Upvote 0
what jtakw posted worked like a charm

My Aswer Is This......probably something in my security settings.

Thank you both for the help
 
Upvote 0
Well that works if you do not mine all those formulas in those cells.
If you look at all the cells that earlier were empty now have a formula in them
what jtakw posted worked like a charm

My Aswer Is This......probably something in my security settings.

Thank you both for the help
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top