Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Copy and Paste down the column

I need a macro to copy the first cell in a row down the column until it runs
into a existing value and then copy that value down until it meets another
existing value and then copy that value down the column and so on.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Copy and Paste down the column

Debra Dalgleish shares a manual technique and a code solution:
http://contextures.com/xlDataEntry02.html

ExcelNovice wrote:

I need a macro to copy the first cell in a row down the column until it runs
into a existing value and then copy that value down until it meets another
existing value and then copy that value down the column and so on.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 186
Default Copy and Paste down the column

Hi,

Please make a back up copy of your workbook before testing. This macro
assumes that the data you want to copy is in column A.

Option Explicit

Dim RowCount As Double
Dim Iloop As Double
Sub CopyDown()

'Turn off warnings, etc.
Application.ScreenUpdating = False
Application.DisplayAlerts = False

RowCount = Cells(Rows.Count, "A").End(xlUp).Row
For Iloop = 1 To RowCount
If IsEmpty(Cells(Iloop, "A")) Then
Cells(Iloop, "A") = Cells(Iloop - 1, "A")
End If
Next Iloop

''Turn on warnings, etc.
Application.DisplayAlerts = True
Application.ScreenUpdating = True

End Sub
--
Ken Hudson


"ExcelNovice" wrote:

I need a macro to copy the first cell in a row down the column until it runs
into a existing value and then copy that value down until it meets another
existing value and then copy that value down the column and so on.

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/paste Column Ray Excel Programming 7 November 27th 06 08:21 PM
Save column J only using copy/paste & temporary copy mikeburg[_85_] Excel Programming 2 June 7th 06 05:37 PM
copy paste (column width prb) Murat D. Hekimošlu Excel Programming 2 May 12th 05 03:31 PM
Copy cell and paste in same column April Excel Programming 1 March 2nd 05 12:29 PM
Copy Column and Paste steveh[_3_] Excel Programming 2 February 2nd 04 01:36 PM


All times are GMT +1. The time now is 01:11 AM.

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"