index/match multi columns as if it were one column

dfida

New Member
Joined
Jan 26, 2010
Messages
49
Hi,

I have several columns, each of which may be in separate tabs.
I am wondering if there is a way to index/match them as if they were just one long column?


Excel Workbook
BCDEFG
8POOLEHARRINGTONGREGORYJOHNSONFLANAGANTAYLOR
9FOUNTAINMURPHYSMITHVEALFLECKHOPS
10BARTHOLOMEWLOPEZEVERTSRICHARDBURTONGRAY
11MARIONEVANSLYONSSURPRISEWALKERQUIGLEY
12DURANDUFFINBALLCARTERLARSENRILEY
13SINCLAIRSMITHLOWRIEKRAMERWALL
14HALLPRYORBELLRANDALLSIMPSON
15MCEVERSBRUNSONFERGUSON
16SHAWCASANOVAGALLOWAY
17CARLSONCUNNINGHAM
18HARRISONBYRD
19HUTCHINSONROY
20MCDONNELLBOSLEY
21
22
23
24
25
26
27ROWCOLUMNINDEX/MATCH
2811POOLE
2981HARRINGTON
30221SMITH
Sheet1
Excel 2007
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
I would guess that your security settings are blocking it, are you blocking macros by default?
 
Upvote 0
Without a UDF, you might look at these two formulas.

In E28,
=SUMPRODUCT(($B$8:$G$20=D28)*(ROW($B$8:$G$20)+COLUMN($B$8:$G$20)/100))

In F28, the CSE formula
=MAX(($B$8:$G$20=D28)*(ROW($B$8:$G$20)+COLUMN($B$8:$G$20)/100))

Note that the results are absolute row/column; relative to the sheet, not the data range. Also, duplicate entries wreck the SUMPRODUCT formula.

<table border=1 cellspacing=0>
<tr align="center" bgcolor=#A0A0A0><td width=25> <td width=25><b>D</b><td width=25><b>E</b><td width=25><b>F</b></tr>
<tr><td align="center" bgcolor=#A0A0A0><b>27</b><td align="left" bgcolor=#FFFFFF>Name<td align="left" bgcolor=#FFFFFF><td align="left" bgcolor=#FFFFFF></tr>
<tr><td align="center" bgcolor=#A0A0A0><b>28</b><td align="left" bgcolor=#FFFFFF>Poole<td align="right" bgcolor=#FFFFFF>8.02<td align="right" bgcolor=#FFFFFF>8.02</tr>
<tr><td align="center" bgcolor=#A0A0A0><b>29</b><td align="left" bgcolor=#FFFFFF>Harrington<td align="right" bgcolor=#FFFFFF>8.03<td align="right" bgcolor=#FFFFFF>8.03</tr>
<tr><td align="center" bgcolor=#A0A0A0><b>30</b><td align="left" bgcolor=#FFFFFF>Smith<td align="right" bgcolor=#FFFFFF>22.07<td align="right" bgcolor=#FFFFFF>13.03</tr>
</table>
 
Upvote 0
Without a UDF, you might look at these two formulas.


Thanks, actually, sorry for not stating this up front, but I am looking create the array for use in another array...e.g. I would like to index this "single column created from multi columns" as a datasource in another part of the worksheet, using a formula like index(a:a, match(countif(....) etc.

Perhaps I will need to use helper columns or some similar strategy.

Thanks again for the help.
 
Upvote 0
The function works fine for me, I assume you did put it in a regualr module and not a worksheet / workbook module?

Does it work if you change the first line of the function code to public?

Code:
Public Function ArrayJoin(ParamArray vArgs() As Variant) As Variant
 
Upvote 0
The function works fine for me, I assume you did put it in a regualr module and not a worksheet / workbook module?

Does it work if you change the first line of the function code to public?

Code:
Public Function ArrayJoin(ParamArray vArgs() As Variant) As Variant

I created a new model "module 2" and pasted the code in there.


-- removed inline image ---
 
Upvote 0

Forum statistics

Threads
1,224,616
Messages
6,179,909
Members
452,949
Latest member
beartooth91

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