Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 61
Default 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!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default 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!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default 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!



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 61
Default 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!




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default 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!








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 61
Default 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!






  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default 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!








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
reference a cell by using a returned value as the row or column nu Hfreeman Excel Worksheet Functions 1 February 29th 08 02:18 AM
Return column number from column header text Roger[_3_] Excel Discussion (Misc queries) 4 February 14th 08 09:40 PM
Get Intersection value given column header and row header Scorcel Excel Discussion (Misc queries) 1 June 6th 07 08:24 AM
how can I return entire row for column value returned Mary Etta Excel Discussion (Misc queries) 3 September 14th 06 05:47 AM
Need reference in adjacent column returned Dan Excel Worksheet Functions 9 March 5th 06 07:05 PM


All times are GMT +1. The time now is 08:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"