LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default range problem

Try setting the range variable rngCellsWithData to Nothing after processing.
You can also test if for nothing to see if there is anything to process.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

wrote in message
...
For iColCnt = 1 To 49
'reset to startingcell
Call UtilitiesQuickSelectStartCell("Numbers", "DrawsTableStart")
'loop through columns
Call RangeTableActiveCellToSpecificRow(iDrawsToUse, 1, 1, iColCnt)
On Error Resume Next
I am trying to loop through a series of columns. I select a range of
cells within each column, if the cells have numbers in them. I find
that when a column has no cells with numeric values the range of cells
from teh previous column is being used. Could someone tell me how to
prevent thios?

thianks

For iColCnt = 1 To 100
'select the cells with numbers
Set rngCellsWithData = Selection.SpecialCells(xlConstants,
xlNumbers)
iTest = rngCellsWithData.SpecialCells(xlConstants,
xlNumbers).Count
If (rngCellsWithData.SpecialCells(xlConstants, xlNumbers).Count
0) Then
'process the cells
End If
Next



 
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
3D range problem br549 Excel Worksheet Functions 1 June 15th 07 08:52 PM
Problem with range [email protected] Excel Discussion (Misc queries) 7 February 14th 07 04:06 PM
Range Problem jesmin Excel Discussion (Misc queries) 19 December 19th 05 12:11 AM
Range problem Reno Excel Programming 7 September 19th 03 07:24 PM
Used Range Problem Donald Lloyd Excel Programming 6 August 3rd 03 10:18 PM


All times are GMT +1. The time now is 10:03 PM.

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"