Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy/paste Column | Excel Programming | |||
Save column J only using copy/paste & temporary copy | Excel Programming | |||
copy paste (column width prb) | Excel Programming | |||
Copy cell and paste in same column | Excel Programming | |||
Copy Column and Paste | Excel Programming |