return row header as answer

  • Thread starter Thread starter bogietrim
  • Start date Start date
B

bogietrim

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.
 
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
 
Zone said:
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




Thanks for your reply. This is just a bit above my skill level to decipher. Like you suggested, it shouldn't be that difficult I wouldn't think.
 

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