INDEX, Output Multiple Columns

Nihil

New Member
Joined
Jan 19, 2014
Messages
2
Hi,

I've just become slightly stuck on using index to output multiple bits of data from different columns on the same row. The formula I'm currently using is below:

Code:
=INDEX(x.csv!$A:$P,SMALL(IF(
((x.csv!$O:$O="PP")+(x.csv!$O:$O="PPB")+(x.csv!$O:$O="DF"))*((x.csv!$P:$P<>x.csv!$A:$A)*(x.csv!$A:$A<>""))
,ROW($A:$A)),ROW(1:1)),{3,4,5,6})

There are a few things that confuse me with this, I was under the impression that if I specified multiple columns at the end then when copy and pasted horizontally it would show the data from the corresponding columns? Currently it only seems to be outputting the data in column three, as below:

UIDClient NameOther Data
123451234512345

<tbody>
</tbody>

What I'm trying to get it to output is this:

UIDNameOther Data
12345Boblalala

<tbody>
</tbody>

The IF function seems to work fine, and it finds the different IDs needed if I copy and paste it vertically, it just doesn't seem to want to give me the different column data along with it :D

On top of that I'm not 100% certain what this is needed for: ",ROW($A:$A)". It seems to function no matter what I set it to, is this because it's being changed by SMALL as it runs through a search loop? Or because I'm setting the value with ,ROW(1:1)? (And if this is the case, can I remove either of the entries if they're redundant? Or is it a little like declaring a variable and then setting it?)

Also in regard to the "figures.csv!$A:$P" at the start, I've only guessed that I need to load the entire table into the array (or at least all the bits I want to output or compare), is this assumption correct?

Anyway as you can all tell I'm pretty new to excel, so I apologise for the excessive number of questions! Any advice or clarification anyone could offer would be a great help though.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Forgot to mention: Currently doing this on Excel 2010.

I can also get this working by simply having three separate columns with different outputs, but I'm working with a pretty big if statement on a workbook with 30,000+ entries and getting ~150 results. I'm hoping that having it as a single array will mean running the search only once and reduce the amount of time needed for workbook calculation.
 
Upvote 0

Forum statistics

Threads
1,203,491
Messages
6,055,727
Members
444,814
Latest member
AutomateDifficulty

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