Row Number of Max Value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 
Thanks, Bernie.


Bernie Deitrick said:
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
 

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