View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Zone[_3_] Zone[_3_] is offline
external usenet poster
 
Posts: 373
Default return row header as answer

bogietrim, My suggestion seems like a ridiculous amount of trouble to go to
for such a simple thing. But, since no one else has replied, I'll pass it
along. Maybe it will be of some help. I'm assuming your numbers are in
column B and your row headers are in column A. James

Sub ShowMaxRow()
Dim RowName, MyMax, c
MyMax = Application.Max(Columns("b:b"))
Set c = ActiveSheet.Columns("b:b").Find(MyMax, LookIn:=xlValues,
lookat:=xlWhole)
RowName = Cells(c.Row, "a")
MsgBox RowName
End Sub

"bogietrim" wrote in message
...
I have a 10 page workbook set up. It's a fairly straight forward table,
just
simply adding rows and columns. Worksheets 2-10 are identical and report
their total values to the first page so that the totals are all
consolidated
in a very easy to read format. What I need to do on each page feeding the
1st
total sheet is to find the max number in a column and have the row header,
which will be a name presented instead of the actual max number. I need to
equate that max number to the name and have that name come up on my total
page. I know how to reference a number (cell) from another sheet, I just
do
not know how to equate this max number to the row header. Make sense? I am
using MS Office 2007 just for information.

Thanks in advance for any and all help here.