LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #15   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default Copy value until next value

Cheers pointless - works like a treat. I knew it wasn't as hard as I was
making it...!!

Thanks to Glen, Tom and Bernie for the input too.

"Pointless" wrote:


That srot of mess up the basics for Bernies "speciel cells" sulution.
Back to the painfully slow word of loops I guess...

Could you make some kind of assumption about the "real" month values?
This example assumes that any value that is less than 2 characters is
actually blank or junk.

Sub Month_copy()
Dim CELL As Range, RNG As Range

Set RNG = ActiveSheet.Range("A2", "A10000")

For Each CELL In RNG
If Len(CELL.Value) < 2 Then CELL.Value = CELL.Offset(-1, 0).Value
Next

End Sub

Set the "RNG" in some clever way (dont start from row 1). Example:
lastRow = ActiveSheet.Range("b10000").End(xlUp).Row
Set RNG = ActiveSheet.Range("A2", ActiveSheet.Cells(lastRow, 1))

/clueless


--
Pointless
------------------------------------------------------------------------
Pointless's Profile: http://www.excelforum.com/member.php...o&userid=30862
View this thread: http://www.excelforum.com/showthread...hreadid=506799




 
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 and paste versus copy and insert copied cells Alana New Users to Excel 1 September 28th 07 08:58 PM
Copy/Paste how to avoid the copy of formula cells w/o calc values Dennis Excel Discussion (Misc queries) 10 March 2nd 06 10:47 PM
EXCEL FILE a copy/a copy/a copy ....filename ve New Users to Excel 1 September 29th 05 09:12 PM
Code to copy range vs Copy Entire Worksheet - can't figure it out Mike Taylor Excel Programming 1 April 15th 04 08:34 PM
How copy format, font, color and border without copy/paste? Michel[_3_] Excel Programming 1 November 5th 03 04:43 PM


All times are GMT +1. The time now is 04:16 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"