Nov 15, 2006 #1 davidd31415 Electrical Joined Nov 23, 2001 Messages 67 Location US Is there a way to make use of Excel's built in Min and Max functions within a VBA program? I would like the returned value to be stored in an integer, not in a cell. Thanks, Dave
Is there a way to make use of Excel's built in Min and Max functions within a VBA program? I would like the returned value to be stored in an integer, not in a cell. Thanks, Dave
Nov 15, 2006 #2 handleman Automotive Joined Jan 7, 2005 Messages 3,411 Location US Excel VBA Help said: WorksheetFunction Property Returns the WorksheetFunction object. Read-only. Example This example displays the result of applying the Min worksheet function to the range A1:A10. Code: Set myRange = Worksheets("Sheet1").Range("A1:C10") answer = Application.WorksheetFunction.Min(myRange) MsgBox answer Click to expand... Upvote 0 Downvote
Excel VBA Help said: WorksheetFunction Property Returns the WorksheetFunction object. Read-only. Example This example displays the result of applying the Min worksheet function to the range A1:A10. Code: Set myRange = Worksheets("Sheet1").Range("A1:C10") answer = Application.WorksheetFunction.Min(myRange) MsgBox answer Click to expand...