Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default 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



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
How to copy&paste a variable range rows and colums IK Excel Discussion (Misc queries) 1 August 30th 06 12:06 AM
Range used in a macro needs to be variable DaveP Excel Worksheet Functions 3 November 4th 05 03:23 PM
variable range in a macro AMK Excel Discussion (Misc queries) 3 July 6th 05 09:32 AM
Is it possible to set a variable range in a macro? Mary About this forum 0 June 12th 05 06:26 PM
Paste a Range from a variable Al[_11_] Excel Programming 3 October 28th 03 06:04 PM


All times are GMT +1. The time now is 04:28 AM.

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

About Us

"It's about Microsoft Excel"