Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default devide rng of copy


i have this rng:
lngMaxRow = Range("A65536").End(xlUp).Row

Set rng = Union(Range("A3:K" & lngMaxRow), Range("N3:AC"
lngMaxRow)).SpecialCells(xlCellTypeVisible)

i would want to copy the first block a3:k of current sheet into a3:k o
ActiveWorkbook.Sheets(1)

i would want to copy the second block n3:ac of current sheet into n3:a
of ActiveWorkbook.Sheets(1)

i have used this but not work!!!!!!!!:

rng.Copy ActiveWorkbook.Sheets(1).Range("A3")
_________________

--
sal2

-----------------------------------------------------------------------
sal21's Profile: http://www.excelforum.com/member.php...nfo&userid=204
View this thread: http://www.excelforum.com/showthread.php?threadid=49163

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default devide rng of copy

Try:

'----------------------------------------------------------------
lngMaxRow = Range("A65536").End(xlUp).Row

On Error Resume Next
Set rng = Range("A3:K" & lngMaxRow).SpecialCells(xlCellTypeVisible)
On Error GoTo 0

If Not rng Is Nothing Then rng.Copy _
ActiveWorkbook.Sheets(1).Range("A3")

Set rng = Nothing

On Error Resume Next
Set rng = Range("N3:AC" & lngMaxRow).SpecialCells(xlCellTypeVisible)
On Error GoTo 0

If Not rng Is Nothing Then rng.Copy _
ActiveWorkbook.Sheets(1).Range("N3")
'------------------------------------------------------------------

Hope this helps
Rowan

sal21 wrote:
i have this rng:
lngMaxRow = Range("A65536").End(xlUp).Row

Set rng = Union(Range("A3:K" & lngMaxRow), Range("N3:AC" &
lngMaxRow)).SpecialCells(xlCellTypeVisible)

i would want to copy the first block a3:k of current sheet into a3:k of
ActiveWorkbook.Sheets(1)

i would want to copy the second block n3:ac of current sheet into n3:ac
of ActiveWorkbook.Sheets(1)

i have used this but not work!!!!!!!!:

rng.Copy ActiveWorkbook.Sheets(1).Range("A3")
__________________


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
sum and devide with not null value Are Excel Discussion (Misc queries) 2 February 27th 10 10:34 PM
devide by 1000 Atiq Excel Discussion (Misc queries) 5 April 29th 09 08:52 PM
devide by 0 error Dreamstar_1961 Excel Worksheet Functions 7 May 6th 07 06:44 AM
Devide/0 error Jean-Paul De Winter Excel Programming 1 October 15th 04 09:36 PM
devide the whole column... mowen Excel Programming 2 April 21st 04 09:20 AM


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