ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   find max value in macro (https://www.excelbanter.com/excel-discussion-misc-queries/215549-find-max-value-macro.html)

Steve

find max value in macro
 
I want to define a constant in my macro to be the maximum value in the range
from c2 to the the last row in column c.

JE McGimpsey

find max value in macro
 
By definition a constant isn't variable. Unless you're trying to chnage
your code modules on the fly...

You could set a variable to that value:

Dim dMax As Double
dMax = Application.WorksheetFunction.Max(Range("C2:C" & Rows.Count))


In article ,
Steve wrote:

I want to define a constant in my macro to be the maximum value in the range
from c2 to the the last row in column c.


Mike H

find max value in macro
 
see your other post

"Steve" wrote:

I want to define a constant in my macro to be the maximum value in the range
from c2 to the the last row in column c.



All times are GMT +1. The time now is 03:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com