Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Copy down macro

I want to copy data down a column in a ws until it finds
an existing entry in the same column. It should the copy
that entry down same column until it finds the next
entry ...
Would someone please help me with a macros or vb fo this
task. I would be very grateful.

JA
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copy down macro


With Activesheet
set rng1 = Intersect(.Columns(1)EntireColumn,.UsedRange)
End with
set rng2 = rng1.specialcells(xlBlanks)
rng2.Formula = "=" & rng2(0).offset(-1,0).Address(0,0)
set rng3 = Activesheet.Range(rng2(1),rng1(rng1.count))
rng3.Formula = rng3.Value

Assumes there are no formulas in the column.

--
Regards,
Tom Ogilvy

JamesA wrote in message
...
I want to copy data down a column in a ws until it finds
an existing entry in the same column. It should the copy
that entry down same column until it finds the next
entry ...
Would someone please help me with a macros or vb fo this
task. I would be very grateful.

JA



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 workbook, don't copy macro CongroGrey Excel Discussion (Misc queries) 1 June 13th 08 04:56 PM
Macro to copy pcor New Users to Excel 5 July 17th 07 01:06 PM
macro copy Pammy Excel Discussion (Misc queries) 1 April 28th 07 03:48 PM
Help with copy macro Kel Excel Discussion (Misc queries) 13 February 21st 05 11:44 PM


All times are GMT +1. The time now is 12:09 PM.

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"