Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ed Ed is offline
external usenet poster
 
Posts: 279
Default Set a constant from a formula in VBA

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
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
Reply
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
Reusing formula Tony29 Excel Discussion (Misc queries) 7 September 7th 06 03:34 AM
Excel displaying formulae as constant and not calculating formula gpbell Excel Worksheet Functions 2 February 16th 06 08:26 AM
Pasting constant formula where referral sheet changes Nicole M. Excel Worksheet Functions 10 January 1st 06 07:54 PM
Formula Constant dale1948 Excel Worksheet Functions 2 November 2nd 05 09:44 PM
Copy a formula maintaining a constant cell Tiana Excel Worksheet Functions 3 July 26th 05 07:27 PM


All times are GMT +1. The time now is 07:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"