LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
Len Len is offline
external usenet poster
 
Posts: 162
Default Copy Dynamic Range problem

On Jan 10, 10:53*pm, joel wrote:
You posting wasn't clear and most people want it the way I did it. *I
also understand why you want it the other way. *sorry!

Try these changes

From

LastRow = .Range("E" & Rows.Count).End(xlUp).Row
FirstRow = LastRow - 4

If LastRow <= c.Row Then
MsgBox ("There are no rows to copy on sheet : " & Sht.Name)
Else

If FirstRow <= c.Row Then
FirstRow = c.Row + 1
End If

To

EndRow = .Range("E" & Rows.Count).End(xlUp).Row

If EndRow <= c.Row Then
MsgBox ("There are no rows to copy on sheet : " & Sht.Name)
Else
FirstRow = c.row + 1
LastRow = FirstRow + 4

If LastRow EndRow Then
LastRow = Endrow
End If

--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread:http://www.thecodecage.com/forumz/sh...d.php?t=168586

Microsoft Office Help


Hi Joel,

Sorry........... my earlier post not clear and now your modified codes
works perfectly

Thanks alot

Regards
Len


 
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
Dynamic copy range LiAD Excel Programming 12 September 2nd 09 09:36 AM
dynamic charts - problem with copy maggym Charts and Charting in Excel 3 August 2nd 09 09:22 PM
Copy dynamic range Sandy Excel Programming 3 April 18th 08 08:14 PM
Dynamic range copy. sungen99[_22_] Excel Programming 1 June 10th 05 04:44 PM
Dynamic range problem #2 rudolpsh[_3_] Excel Programming 0 January 23rd 04 09:03 AM


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