Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Row Number of Max Value
Hi,
I have an array and would like to get the "column" number of the maximum value in that array. I can get the address of max value by "maxval = n.Address(maxvalue)" as $E$1, but I would like to get column the number as numerical value. I tried "colnum = n.Column(maxvalue)" and it is not working. Any suggestions how I can get column number? Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Row Number of Max Value
If maxvalue is a range object:
Dim myCol As Integer myCol = maxvalue.column But since maxval is a variable with an address string: Dim myCol As Integer myCol = Range(maxval).column HTH, Bernie MS Excel MVP "GreenInIowa" wrote in message ... Hi, I have an array and would like to get the "column" number of the maximum value in that array. I can get the address of max value by "maxval = n.Address(maxvalue)" as $E$1, but I would like to get column the number as numerical value. I tried "colnum = n.Column(maxvalue)" and it is not working. Any suggestions how I can get column number? Thanks. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Row Number of Max Value
Thanks, Bernie.
"Bernie Deitrick" wrote: If maxvalue is a range object: Dim myCol As Integer myCol = maxvalue.column But since maxval is a variable with an address string: Dim myCol As Integer myCol = Range(maxval).column HTH, Bernie MS Excel MVP "GreenInIowa" wrote in message ... Hi, I have an array and would like to get the "column" number of the maximum value in that array. I can get the address of max value by "maxval = n.Address(maxvalue)" as $E$1, but I would like to get column the number as numerical value. I tried "colnum = n.Column(maxvalue)" and it is not working. Any suggestions how I can get column number? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sumif number is greater than a number but less than another number | Excel Discussion (Misc queries) | |||
How can I click on a telephone number in an Excel 2002 spreadsheet, and have the number dialed? | Excel Discussion (Misc queries) | |||
Easy Reading - large number minus small number | New Users to Excel | |||
How to calculate number of occurencies of a specific number number | Excel Discussion (Misc queries) | |||
Rounding a number to a multiple quantity that adds to a fixed total number | Excel Worksheet Functions |