View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Pb21 Pb21 is offline
external usenet poster
 
Posts: 1
Default help with looping range and extracting value


I want to sum the values in a range and have the following code:

Dim Total As Integer



For Each c In Worksheets("Error Codes").Range("T10:T45").Cells

Total = Total + c.Value

Next

ErrorCount = Total

I added a watch to c and the looping works or at least appears to ye
it wont extract a value despite the column t10 onwards having values.


Regards in advance for assistance.

Pete

--
Pb2
-----------------------------------------------------------------------
Pb21's Profile: http://www.excelforum.com/member.php...fo&userid=1539
View this thread: http://www.excelforum.com/showthread.php?threadid=27011