View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default calculate Min and Max Values of selection

Worksheets("Sheet2").Cells(row_num,col_num).Value = Minimum


--

HTH

RP
(remove nothere from the email address if mailing direct)


"bandy2000" wrote in message
...
Thanks for the hints. What I have done now is:
Set SelectedRange = Range(ActiveCell, ActiveCell.Offset(NumMeasPerPix - 1,

0))
Minimum = Application.WorksheetFunction.Min(SelectedRange)
MsgBox "Minimum= " & CStr(Minimum)

How can I make the Argument for Range (here "A1") in
Worksheets("Sheet2").Range("A1").VAlue = Minimum
depending to a variable so that I could for instance use a for loop and

make
the
cell where the value is written to depending to counting variable i ?

"Bob Phillips" wrote:

Msgbox Application.MAX(Range(ActiveCell,

ActiveCell.Offset(NumMeasPerPix -
1, 0)))

ertc.
to store in a different worksheet

Worksheets("Sheet2").Range("A1").VAlue = Application.MAX( ...

--

HTH

RP
(remove nothere from the email address if mailing direct)


"bandy2000" wrote in message
...
HI
I have a range selected as following:

Range(ActiveCell, ActiveCell.Offset(NumMeasPerPix - 1, 0)).Select

How can I do calculations with the data in that selection e.g. get the

Min
or Max Value or the Mean Value? Those are all available in Excel. How

can
I
make them available programatically?
Is it possible to store the result in a different worksheet? How?

Thanks