Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Formula to choose from the last column of a given row

I have a table that looks like this:

Item 7/9 7/10 7/11
A 23 342 2323
B 343 219 643

Every day I add a new column with some additional data. Sometimes I add a new row for a new item.

I would like a second table that will draw from the first table, and give me the values in the last two columns of the first table for each item. So it might look like this:

Item Col1 Col 2
A 342 2323
B 219 643

Is there a formula I can use that will always pull the last two columns' worth of data for me?

Thanks much,
David
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,045
Default Formula to choose from the last column of a given row

On Thu, 12 Jul 2012 16:10:46 -0700 (PDT), David Tannenbaum wrote:

I have a table that looks like this:

Item 7/9 7/10 7/11
A 23 342 2323
B 343 219 643

Every day I add a new column with some additional data. Sometimes I add a new row for a new item.

I would like a second table that will draw from the first table, and give me the values in the last two columns of the first table for each item. So it might look like this:

Item Col1 Col 2
A 342 2323
B 219 643

Is there a formula I can use that will always pull the last two columns' worth of data for me?

Thanks much,
David


IF your data table begins in A1; and if there are no blank cells in column A or row 1, then one way is to use a dynamic range name to define your data table:

eg: Define Name
Name: DataTbl
Scope: Workbook
Refers To: =OFFSET($A$1,0,0,COUNTA($A:$A),COUNTA($1:$1))

Then, with your 2nd table starting in column M (adjust the references depending on where you have this new table)

To return col1 for Item A (where "A" is in M15):
=INDEX(DataTbl,MATCH($M15,$A:$A,0),COLUMNS(DataTbl )-1)

To return col2 for Item A:
=INDEX(DataTbl,MATCH($M15,$A:$A,0),COLUMNS(DataTbl ))

And with your Item names in col M; just select N15:O15 and fill down as far as required.
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Formula to choose from the last column of a given row

Awesome! Thank you!

On Thursday, July 12, 2012 5:01:08 PM UTC-7, Ron Rosenfeld wrote:
On Thu, 12 Jul 2012 16:10:46 -0700 (PDT), David Tannenbaum wrote:



I have a table that looks like this:




Item 7/9 7/10 7/11


A 23 342 2323


B 343 219 643




Every day I add a new column with some additional data. Sometimes I add a new row for a new item.




I would like a second table that will draw from the first table, and give me the values in the last two columns of the first table for each item. So it might look like this:




Item Col1 Col 2


A 342 2323


B 219 643




Is there a formula I can use that will always pull the last two columns' worth of data for me?




Thanks much,


David




IF your data table begins in A1; and if there are no blank cells in column A or row 1, then one way is to use a dynamic range name to define your data table:



eg: Define Name

Name: DataTbl

Scope: Workbook

Refers To: =OFFSET($A$1,0,0,COUNTA($A:$A),COUNTA($1:$1))



Then, with your 2nd table starting in column M (adjust the references depending on where you have this new table)



To return col1 for Item A (where "A" is in M15):

=INDEX(DataTbl,MATCH($M15,$A:$A,0),COLUMNS(DataTbl )-1)



To return col2 for Item A:

=INDEX(DataTbl,MATCH($M15,$A:$A,0),COLUMNS(DataTbl ))



And with your Item names in col M; just select N15:O15 and fill down as far as required.


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
CHOOSE from a column FARAZ QURESHI Excel Discussion (Misc queries) 6 February 2nd 09 02:14 PM
How to indicate in formula to choose the entire column starting from a specified cell? [email protected] Excel Discussion (Misc queries) 3 June 13th 06 04:25 AM
how i choose the column from a combo box Alberto Vargas Excel Discussion (Misc queries) 4 July 22nd 05 11:07 PM
AUTOMATICALLY CHOOSE COLUMN H OR G DEPENDANT ON CONTENT IN COLUMN. Tigers Excel Programming 1 November 1st 04 04:56 PM
choose more than 1 column Andre Croteau Excel Programming 4 October 11th 03 12:42 PM


All times are GMT +1. The time now is 06:30 PM.

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"