View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
ker_01 ker_01 is offline
external usenet poster
 
Posts: 395
Default WorksheetFunction Calculation Error

I'd suggest including the sheet reference for the CountA; something like this
(untested)

errorWS.Range("B3").Value =
Application.WorksheetFunction.CountA(errorWS.Range ("A5:A" &
errorWS_startRow - 1))

"Ayo" wrote:

errorWS.Range("B3").Value = Application.WorksheetFunction.CountA("A5:A" &
errorWS_startRow - 1)

The above line of code is always 1, even when errorWS_startRow is much 1,
i.e:
errorWS_startRow=144, 749 etc.

Any ideas what is going on?