![]() |
return row header as answer
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. |
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. |
return row header as answer
"Zone" wrote: 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. 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. |
All times are GMT +1. The time now is 12:01 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com