Min & Max w/o formula

  • Thread starter Thread starter David
  • Start date Start date
D

David

Hi Again,

I am still working with charts, but this is simplier.
With out putting a formula on a sheet, I want to evaluate
a column for both it's min value and it's max value. I
know how to do it with a formula placed into the sheet,
but can code alone be used, no formula?

Thanks Again,
David
 
David,

How's this?

Sub test()

Dim result As Long

result = Application.Evaluate("MAX(A:A)")
MsgBox result

End Sub

hth,

Doug
 
Evaluate may be a bit of a hammer for this. Worksheetfunction works as well

worksheetfunction.max(range("A:A"))

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Bob and Doug,
Thanks to you both. Don't you love Excel, not just one
way, but two?
David
 
Thanks Bob.

Doug

Bob Phillips said:
Evaluate may be a bit of a hammer for this. Worksheetfunction works as well

worksheetfunction.max(range("A:A"))

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top