Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default returning offset row from excel table


Friends,

I am working on an excel project at my office. I have a table set up
with 12 Months (Jan-Dec) running across the top, and usernames running
down the left. The data inside the table consists of each users total
spending within the given month.

Right side, (outside of the table) I want to start gathering
information. By using the MAX function "=MAX(B5:O5)" I was easily able
to calculate the max monthly amount spent in the year. However, I also
want to return the name of the month in which they spent this amount.
So, I want to return the column in which the amount was spent (just
like in the max function) but offset the returned row to be the row
containing the DATE information that runs across the top of the table.


I hope that makes some sense, any ideas?

I have messed around a bit with the COL and ROW functions, but it seems
that you cannot put in a function within these functions. For example,
it will correctly return =COL(B5) but I need it to return something
similar to =COL(MAX(B5:O5)) which it will not return (gives an error
and wont let me use the formula.

I have also looked at the OFFSET function, but it seems that the same
COL problem exists.

Thanks for the help,

Brendan


--
destrolennox
------------------------------------------------------------------------
destrolennox's Profile: http://www.excelforum.com/member.php...o&userid=36503
View this thread: http://www.excelforum.com/showthread...hreadid=562627

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 79
Default returning offset row from excel table

Assuming your MAX function formula is in cell P5, and you want the result of
the corresponding month to show in cell Q5:
=INDEX((B1:O1),MATCH(P5,B5:O5,0))
Although I am not sure why your range is 14 cells when there are 12 months.

-Simon

"destrolennox" wrote:


Friends,

I am working on an excel project at my office. I have a table set up
with 12 Months (Jan-Dec) running across the top, and usernames running
down the left. The data inside the table consists of each users total
spending within the given month.

Right side, (outside of the table) I want to start gathering
information. By using the MAX function "=MAX(B5:O5)" I was easily able
to calculate the max monthly amount spent in the year. However, I also
want to return the name of the month in which they spent this amount.
So, I want to return the column in which the amount was spent (just
like in the max function) but offset the returned row to be the row
containing the DATE information that runs across the top of the table.


I hope that makes some sense, any ideas?

I have messed around a bit with the COL and ROW functions, but it seems
that you cannot put in a function within these functions. For example,
it will correctly return =COL(B5) but I need it to return something
similar to =COL(MAX(B5:O5)) which it will not return (gives an error
and wont let me use the formula.

I have also looked at the OFFSET function, but it seems that the same
COL problem exists.

Thanks for the help,

Brendan


--
destrolennox
------------------------------------------------------------------------
destrolennox's Profile: http://www.excelforum.com/member.php...o&userid=36503
View this thread: http://www.excelforum.com/showthread...hreadid=562627


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,688
Default returning offset row from excel table

Hi!

If you have the 12 months listed starting in column B then the 12th month
should be in column M.

Assume the month names are in row 1, B1:M1.

=INDEX(B1:M1,MATCH(MAX(B5:M5),B5:M5,0))

Note: if there is more than one instance of MAX the formula will match the
first instance.

Biff

"destrolennox"
wrote in message
news:destrolennox.2b5rss_1153255207.5349@excelforu m-nospam.com...

Friends,

I am working on an excel project at my office. I have a table set up
with 12 Months (Jan-Dec) running across the top, and usernames running
down the left. The data inside the table consists of each users total
spending within the given month.

Right side, (outside of the table) I want to start gathering
information. By using the MAX function "=MAX(B5:O5)" I was easily able
to calculate the max monthly amount spent in the year. However, I also
want to return the name of the month in which they spent this amount.
So, I want to return the column in which the amount was spent (just
like in the max function) but offset the returned row to be the row
containing the DATE information that runs across the top of the table.


I hope that makes some sense, any ideas?

I have messed around a bit with the COL and ROW functions, but it seems
that you cannot put in a function within these functions. For example,
it will correctly return =COL(B5) but I need it to return something
similar to =COL(MAX(B5:O5)) which it will not return (gives an error
and wont let me use the formula.

I have also looked at the OFFSET function, but it seems that the same
COL problem exists.

Thanks for the help,

Brendan


--
destrolennox
------------------------------------------------------------------------
destrolennox's Profile:
http://www.excelforum.com/member.php...o&userid=36503
View this thread: http://www.excelforum.com/showthread...hreadid=562627



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default returning offset row from excel table


Thanks for the help guys! Your suggestions worked perfectly!

-Brendan


--
destrolennox
------------------------------------------------------------------------
destrolennox's Profile: http://www.excelforum.com/member.php...o&userid=36503
View this thread: http://www.excelforum.com/showthread...hreadid=562627

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,688
Default returning offset row from excel table

You're welcome!

Biff

"destrolennox"
wrote in message
news:destrolennox.2b5v1i_1153259413.0225@excelforu m-nospam.com...

Thanks for the help guys! Your suggestions worked perfectly!

-Brendan


--
destrolennox
------------------------------------------------------------------------
destrolennox's Profile:
http://www.excelforum.com/member.php...o&userid=36503
View this thread: http://www.excelforum.com/showthread...hreadid=562627





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
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
Data in table, may need to convert to columns with OFFSET? Ron H Excel Discussion (Misc queries) 5 July 31st 05 06:44 PM
Table copied from Excel to powerpoint print all bold? Yolandi Excel Worksheet Functions 0 June 29th 05 12:02 PM
paste excel table to word Stephen Excel Worksheet Functions 1 January 23rd 05 03:27 PM
Paste table from excel to word Stephen Excel Worksheet Functions 0 January 22nd 05 11:15 AM


All times are GMT +1. The time now is 07:10 PM.

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

About Us

"It's about Microsoft Excel"