View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Set a constant from a formula in VBA

Dim K as double ' you sure you want Long???

with sheets("a")
k = application.max(.range("a:a"))
end with



Ed wrote:

I have now this:

Dim K As Long
With Sheets("A")
K = ( * here I want to have as k the result of the fomula =MAX(A:A).)

How do I manage to take values from formulas rather than a specific cell?

,thanks


--

Dave Peterson