LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default empty range causes error

good morning, dave. here's code so far, right now it works for each bloc
(there are six), but i'm not sure how to chance the range name, i.e., bloc1,
bloc2, etc. within the a loop. any ideas

Sub consolidated()

Dim testrng As Range
Dim drop As Integer
ActiveSheet.Cells(3, 1).Select

'for counter 1 to 6

Set testrng = Nothing
On Error Resume Next
Set testrng = Range("bloc1")
On Error GoTo errorhandler

If testrng Is Nothing Then
Else:

drop = Range("bloc1").Rows.Count
Range("bloc1").Copy ActiveCell
ActiveCell.Offset(drop, 0).Activate

End If
'Next

errorhandler: Exit Sub

End Sub

 
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
Empty cell range and error 91 abdrums Excel Programming 1 June 1st 07 01:00 AM
#Empty error Alan P Excel Discussion (Misc queries) 2 October 5th 06 02:37 PM
Trapping error from Empty Dynamic Named Range Casey[_105_] Excel Programming 5 June 13th 06 03:43 PM
Finding next empty empty cell in a range of columns UncleBun Excel Programming 1 January 13th 06 11:22 PM


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