Returning multiple HLOOKUP values ignoring blanks?

alexx579

New Member
Joined
Aug 19, 2014
Messages
44
Hi all, In A2:A32, I have a list of Toyota vehicle names. In subsequent columns from B:S, I have model years. Each vehicle name does not have the same quantity of model years, some have only 1 other have 11.

My question is this: A2 (Camry) has 4 model years (B2: E2) to the right of it. In Z2:Z5 I have camry autofilled 4 times (corresponding to the number of model years listed). The list continues vertically for each vehicle name. How do I convert their corresponding model years (from B:S) and drop them into Column AA so now they tie out all vertically?

Any formula help is appreciated, don't want to mess with VBA.......:)

A B C D E

Camry 2012 2014 2004 2008
Scion 2005 2001 1999

Converted to:
Camry 2004
Camry 2008
Camry 2012
Camry 2014
Scion 1999
Scion 2001
Scion 2005
Camry 2014
 
Last edited:

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Try in AA2:

=SMALL(OFFSET($B$1:$L$1,MATCH(Z2,$A$2:$A$32,0),0),COUNTIF($Z$2:$Z2,Z2))
 
Upvote 0
Hi!

If I understand what you want, maybe the Array Formula below can helps.

In AA2 and copy down - use Ctrl+Shift+Enter to enter the formula

=IFERROR(INDEX($A$2:$A$32,SMALL(IF($B$2:$S$32 <> "",ROW($A$2:$A$32)-ROW($A$2)+1),ROWS($AA$2:$AA2)))&" "&
MOD(SMALL(IF($B$2:$S$32 <> "",(ROW($A$2:$A$32)-ROW($A$2)+1)*10^6+$B$2:$S$32),ROWS($AA$2:$AA2)),10^6),"")



ABCDEFGHIJKLMNOPQRSTZAAAB
1NamesYear01Year02Year03Year04Year05Year06Year07Year08Year09Year10Year11Year12Year13Year14Year15Year16Year17Year18List
2Toyota012012201420042008Toyota01 2004
3Toyota02200520011999Toyota01 2008
4Toyota032004200820122014Toyota01 2012
5Toyota04200520011999Toyota01 2014
6Toyota0520182010201820172002Toyota02 1999
7Toyota06201620042014200120092008Toyota02 2001
8Toyota072001200520182016201820062010Toyota02 2005
9Toyota082009Toyota03 2004
10Toyota0920032015201720042009201020112000201620142008Toyota03 2008
11Toyota1020142017Toyota03 2012
12Toyota1120102018Toyota03 2014
13Toyota1220072017Toyota04 1999
14Toyota1320032003Toyota04 2001
15Toyota1420142015Toyota04 2005
16Toyota1520012015Toyota05 2002
17Toyota1620122006Toyota05 2010
18Toyota1720002015Toyota05 2017
19Toyota1820122005Toyota05 2018
20Toyota1920132001Toyota05 2018
21Toyota2020042004Toyota06 2001
22Toyota2120132003Toyota06 2004
23Toyota2220032004Toyota06 2008
24Toyota23200120142009201820122006200320082007Toyota06 2009
25Toyota2420172014200420122001200320152005Toyota06 2014
26Toyota252005200120152017200720132000Toyota06 2016
27Toyota2620132007201120142000200420012015Toyota07 2001
28Toyota2720012013200520072010201820112006Toyota07 2005
29Toyota2820012008Toyota07 2006
30Toyota2920002011Toyota07 2010
31Toyota3020122005Toyota07 2016
32Toyota312004200120002010200720122006200820052003201420152018Toyota07 2006
33Toyota07 2010
128Toyota31 2014
129Toyota31 2015
130Toyota31 2018
131
*****************************************************************************************************************************************************************

<tbody>
</tbody>


Markmzz
 
Upvote 0

Forum statistics

Threads
1,216,581
Messages
6,131,544
Members
449,654
Latest member
andz

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