ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to Paste to a Variable Range - HELP (https://www.excelbanter.com/excel-programming/306324-macro-paste-variable-range-help.html)

Brandon - Excelinator

Macro to Paste to a Variable Range - HELP
 
Please help - I am trying to create a macro that works through a selected
range (loop, specifically a column) and finds empty cells and pastes the text
from the cell directly above it into the empty cell.
If anyone has an idea or an easier way to accomplish this it would be
appreciated.

Brandon

Don Guillett[_4_]

Macro to Paste to a Variable Range - HELP
 
try this
Sub pastedown()
For Each c In Range("a2:a15")
If Len(Cells(c.Row, "a")) < 1 Then
c.Value = c.Offset(-1)
End If
Next
End Sub

--
Don Guillett
SalesAid Software

"Brandon - Excelinator" <Brandon -

wrote in message ...
Please help - I am trying to create a macro that works through a selected
range (loop, specifically a column) and finds empty cells and pastes the

text
from the cell directly above it into the empty cell.
If anyone has an idea or an easier way to accomplish this it would be
appreciated.

Brandon





All times are GMT +1. The time now is 05:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com