View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Kleev Kleev is offline
external usenet poster
 
Posts: 34
Default VBA question concerning variables

Well, you could use something like
x = worksheetfunction.counta(range("b2:b116"))
and x would be the variable with the changing data.

"SWT" wrote:

Can Visual Basic get information from a cell and then use that as a
variable?

I have a cell that changes using the function counta. The number in
the Counta formula will change from day to day. I would like to use
that number as a variable in a macro.

Does anyone have any VBA code that shows how this could be done?

SWT