ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Programming Min and Max (https://www.excelbanter.com/excel-programming/404125-programming-min-max.html)

Moises

Programming Min and Max
 
I would like to write a code that calculates the min and max in a range of
cells and compares them in order to find the cell that contain both values.
this has to be done in several rows.

For example:
The data are from cells(4,7) to Cells(4,11)
What should I write to get the min and assign it to a variable name ?
I wrote : Mmo = MIN(cells(4,7):Cells(4,11)) , but it is not correct
--
Thanks , Moises

Dan R.

Programming Min and Max
 
Mmo = Application.WorksheetFunction.Min(Range("G4:K4"))

--
Dan

On Jan 11, 2:17*pm, Moises wrote:
I would *like to write a code that calculates the min and max in a range of
cells and compares them in order to find the cell that contain both values..
this has to be done *in several rows.

For example:
The data are from cells(4,7) to Cells(4,11)
What should I write to get the min and assign it to a variable name ?
I wrote * : *Mmo = MIN(cells(4,7):Cells(4,11)) * , but it is not correct *
--
Thanks , Moises


Moises

Programming Min and Max
 
Many thanks!
--
Moises


"Moises" wrote:

I would like to write a code that calculates the min and max in a range of
cells and compares them in order to find the cell that contain both values.
this has to be done in several rows.

For example:
The data are from cells(4,7) to Cells(4,11)
What should I write to get the min and assign it to a variable name ?
I wrote : Mmo = MIN(cells(4,7):Cells(4,11)) , but it is not correct
--
Thanks , Moises



All times are GMT +1. The time now is 11:52 PM.

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