ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   MAX & MIN - Can Column Header be returned with these? (https://www.excelbanter.com/excel-worksheet-functions/198607-max-min-can-column-header-returned-these.html)

Diana

MAX & MIN - Can Column Header be returned with these?
 
Hello,

I'm doing MAX & MIN formulas on financial data. Instead of having the
actual MAX or MIN dollar amount show, I want the column header name to appear
instead. I haven't been able to figure it out. Is what I'm asking for
something that can be done?

Thanks for any guidance!

Gary''s Student

MAX & MIN - Can Column Header be returned with these?
 
This UDF is for Max:

Public Function header(r As Range) As String
Dim rr As Range
Dim v As Variant
v = Application.WorksheetFunction.Max(r)
For Each rr In r
If rr.Value = v Then
Exit For
End If
Next
header = Cells(1, rr.Column).Value
End Function

Min is similar
--
Gary''s Student - gsnu200800


"Diana" wrote:

Hello,

I'm doing MAX & MIN formulas on financial data. Instead of having the
actual MAX or MIN dollar amount show, I want the column header name to appear
instead. I haven't been able to figure it out. Is what I'm asking for
something that can be done?

Thanks for any guidance!


T. Valko

MAX & MIN - Can Column Header be returned with these?
 
Is what I'm asking for something that can be done?

Yes, but you have to provide some details.


--
Biff
Microsoft Excel MVP


"Diana" wrote in message
...
Hello,

I'm doing MAX & MIN formulas on financial data. Instead of having the
actual MAX or MIN dollar amount show, I want the column header name to
appear
instead. I haven't been able to figure it out. Is what I'm asking for
something that can be done?

Thanks for any guidance!




Diana

MAX & MIN - Can Column Header be returned with these?
 
Here is an example of what I need:

East West North South Max
Min
Joe $10 $23 $25 $21 North
East
Joy $35 $18 $11 $17 East
North

When I do my Max & Min formulas, I want the actual header to show, not the
$$$.

There has to be a way to do it because I do a reverse when using Match &
Index formulas..

Thanks so much!!!

"T. Valko" wrote:

Is what I'm asking for something that can be done?


Yes, but you have to provide some details.


--
Biff
Microsoft Excel MVP


"Diana" wrote in message
...
Hello,

I'm doing MAX & MIN formulas on financial data. Instead of having the
actual MAX or MIN dollar amount show, I want the column header name to
appear
instead. I haven't been able to figure it out. Is what I'm asking for
something that can be done?

Thanks for any guidance!





T. Valko

MAX & MIN - Can Column Header be returned with these?
 
Try this:

Column headers East - South in the range B1:E1

For the MAX:

=INDEX(B$1:E$1,MATCH(MAX(B2:E2),B2:E2,0))

For the MIN:

=INDEX(B$1:E$1,MATCH(MIN(B2:E2),B2:E2,0))

Copy both down as needed.

--
Biff
Microsoft Excel MVP


"Diana" wrote in message
...
Here is an example of what I need:

East West North South Max
Min
Joe $10 $23 $25 $21 North
East
Joy $35 $18 $11 $17 East
North

When I do my Max & Min formulas, I want the actual header to show, not the
$$$.

There has to be a way to do it because I do a reverse when using Match &
Index formulas..

Thanks so much!!!

"T. Valko" wrote:

Is what I'm asking for something that can be done?


Yes, but you have to provide some details.


--
Biff
Microsoft Excel MVP


"Diana" wrote in message
...
Hello,

I'm doing MAX & MIN formulas on financial data. Instead of having the
actual MAX or MIN dollar amount show, I want the column header name to
appear
instead. I haven't been able to figure it out. Is what I'm asking for
something that can be done?

Thanks for any guidance!







Diana

MAX & MIN - Can Column Header be returned with these?
 
Great! Thanks so much....

"T. Valko" wrote:

Try this:

Column headers East - South in the range B1:E1

For the MAX:

=INDEX(B$1:E$1,MATCH(MAX(B2:E2),B2:E2,0))

For the MIN:

=INDEX(B$1:E$1,MATCH(MIN(B2:E2),B2:E2,0))

Copy both down as needed.

--
Biff
Microsoft Excel MVP


"Diana" wrote in message
...
Here is an example of what I need:

East West North South Max
Min
Joe $10 $23 $25 $21 North
East
Joy $35 $18 $11 $17 East
North

When I do my Max & Min formulas, I want the actual header to show, not the
$$$.

There has to be a way to do it because I do a reverse when using Match &
Index formulas..

Thanks so much!!!

"T. Valko" wrote:

Is what I'm asking for something that can be done?

Yes, but you have to provide some details.


--
Biff
Microsoft Excel MVP


"Diana" wrote in message
...
Hello,

I'm doing MAX & MIN formulas on financial data. Instead of having the
actual MAX or MIN dollar amount show, I want the column header name to
appear
instead. I haven't been able to figure it out. Is what I'm asking for
something that can be done?

Thanks for any guidance!







T. Valko

MAX & MIN - Can Column Header be returned with these?
 
You're welcome!

--
Biff
Microsoft Excel MVP


"Diana" wrote in message
...
Great! Thanks so much....

"T. Valko" wrote:

Try this:

Column headers East - South in the range B1:E1

For the MAX:

=INDEX(B$1:E$1,MATCH(MAX(B2:E2),B2:E2,0))

For the MIN:

=INDEX(B$1:E$1,MATCH(MIN(B2:E2),B2:E2,0))

Copy both down as needed.

--
Biff
Microsoft Excel MVP


"Diana" wrote in message
...
Here is an example of what I need:

East West North South Max
Min
Joe $10 $23 $25 $21 North
East
Joy $35 $18 $11 $17 East
North

When I do my Max & Min formulas, I want the actual header to show, not
the
$$$.

There has to be a way to do it because I do a reverse when using Match
&
Index formulas..

Thanks so much!!!

"T. Valko" wrote:

Is what I'm asking for something that can be done?

Yes, but you have to provide some details.


--
Biff
Microsoft Excel MVP


"Diana" wrote in message
...
Hello,

I'm doing MAX & MIN formulas on financial data. Instead of having
the
actual MAX or MIN dollar amount show, I want the column header name
to
appear
instead. I haven't been able to figure it out. Is what I'm asking
for
something that can be done?

Thanks for any guidance!










All times are GMT +1. The time now is 11:35 AM.

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