Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Copy a value in a column over blank cells

I would like to copy values in Column A over blank cells until the next
available value. I would like this to run in a loop until a blank row is
reached. I would be grateful if you could provide me a macro that can do this.


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200605/1
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Copy a value in a column over blank cells

Don't loop:

Sub FillColumnA()
On Error GoTo NoBlanks
With Columns("A:A")
.SpecialCells(xlCellTypeBlanks).FormulaR1C1 = "=R[-1]C"
.Copy
.PasteSpecial Paste:=xlPasteValues
End With
Application.CutCopyMode = False
NoBlanks:
End Sub

HTH,
Bernie
MS Excel MVP


"mohd21uk via OfficeKB.com" <u20517@uwe wrote in message news:5ffe29df54ebe@uwe...
I would like to copy values in Column A over blank cells until the next
available value. I would like this to run in a loop until a blank row is
reached. I would be grateful if you could provide me a macro that can do this.


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200605/1



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy cells become blank MasterDragon New Users to Excel 1 January 3rd 10 05:37 PM
How to copy info into blank cells within a column (going up the co Marty Excel Discussion (Misc queries) 1 January 19th 09 12:18 AM
how to copy blank cells Careeranalysts Excel Discussion (Misc queries) 2 August 24th 07 03:38 PM
Copy a formula into a blank column only to the last data row Kebbon Excel Worksheet Functions 4 August 16th 07 11:43 PM
HOW DO I COPY THE LAST NON BLANK CELL IN A COLUMN Needles Excel Worksheet Functions 2 October 16th 05 06:39 PM


All times are GMT +1. The time now is 03:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"