select the most recent value from one block of 10 columns

AmandaSS

Board Regular
Joined
Jan 7, 2014
Messages
133
Hi everybody,

I have one block of 10 columns. The 10 columns contain data ordered by year (from the most recent to the oldest - 2019 - 2018 .... - 2010).

Example of block of 10 columns:

[TABLE="width: 500"]
<tbody>[TR]
[TD]company
[/TD]
[TD]A 2019
[/TD]
[TD]A 2018
[/TD]
[TD]A 2017
[/TD]
[TD]A 2016
[/TD]
[TD]A 2015
[/TD]
[TD]A 2014
[/TD]
[TD]A 2013
[/TD]
[TD]A 2012
[/TD]
[TD]A 2011
[/TD]
[TD]A 2010
[/TD]
[TD]value for company
[/TD]
[/TR]
[TR]
[TD]X
[/TD]
[TD][/TD]
[TD]52
[/TD]
[TD]23
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]256
[/TD]
[TD][/TD]
[TD][/TD]
[TD]52
[/TD]
[/TR]
[TR]
[TD]Y
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]111
[/TD]
[TD]111
[/TD]
[/TR]
[TR]
[TD]Z
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]12
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]12
[/TD]
[/TR]
</tbody>[/TABLE]

What i need is to find the most recent "value for each company" and visualized in the last column.

Thanks for the help!
Amanda
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Hi Amanda,

In cell L2 you can test following array formula

Code:
=OFFSET(A2,0,MATCH(TRUE,B2:K2<>"",0))

Hope this will help
 
Upvote 0
How about
=INDEX(B2:K2,MATCH(TRUE,(B2:K2<>""),0))

This needs to be confirmed with Ctrl Shift Enter, not just Enter
 
Upvote 0
Alternatively a non-array formula
=INDEX(B2:K2,MATCH(TRUE,INDEX((B2:K2<>""),0),0))
 
Upvote 0
Code:
=OFFSET(A2,0,MATCH(TRUE,B2:K2<>"",0))

Hi and thanks for helping!
i tried your formula, but it didn't work.
I have to find the most recent data available along the row B2 to M2 (where in B2 there is data for 2019 and in M2 the data refers to 2010).

cheers
 
Upvote 0
hi and thanks for helping to you too!

i tried also both formula but the first one doesn't give any result and the second one gives back the data in column 2019. It seams like it doesn't select from the row.

cheers,
Amanda
 
Upvote 0
Alternatively a non-array formula
=INDEX(B2:K2,MATCH(TRUE,INDEX((B2:K2<>""),0),0))

Hi Fluff,
hiand thanks for helping to you too!

i tried also both formula but the first one doesn't give any result and the second one gives back the data in column 2019. It seams like it doesn't select from the row.

cheers,
Amanda
 
Upvote 0
In you example there wasn't any data in col 2019, but I thought that that was what you wanted.


Book1
ABCDEFGHIJKLM
1companyA 2019A 2018A 2017A 2016A 2015A 2014A 2013A 2012A 2011A 2010value for company
2X52232565252
3Y221112222
4Z121212
Data
Cell Formulas
RangeFormula
M2=INDEX(B2:K2,MATCH(TRUE,INDEX((B2:K2<>""),0),0))
L2{=INDEX(B2:K2,MATCH(TRUE,(B2:K2<>""),0))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Hello,

For an Array Formula ... intead of using the ' standard ' Enter key ...

you need to use simultaneously the three keys : Control Shift Enter

Hope this clarifies
 
Last edited:
Upvote 0
thanks for your feedbacks, James006 and Fluff, but i still dont understand why it does not work..

here a print screen of what i have done.

thanks,
Amanda


PS: unfortunately the web site does not allow to insert pic from a desktop directory
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,187
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top