Array formula

lwilt

Board Regular
Joined
May 16, 2013
Messages
187
Hi,

I'm trying to use a formula I've used before but not it's giving me a reference error. I'm trying to move the data from sheet two over into sheet one so that instead of being on a single row it gets transposed into the column where Column A matches for both sheets.

The formulas I was using is:

=IF(INDEX(Sheet2!$A$2:$K$8,MATCH(Sheet1!A2,Sheet2!$A$2:$A$8,0),SMALL(IFERROR(COLUMN($A$1:$K$1)/(LEFT(Sheet2!$A$1:$K$1,3)="Qty"),100000),COUNTIFS(A$2:A2,A2)))=0,"",INDEX(Sheet2!$A$2:$K$8,MATCH(Sheet1!A2,Sheet2!$A$2:$A$8,0),SMALL(IFERROR(COLUMN($A$1:$K$1)/(LEFT(Sheet2!$A$1:$K$1,3)="Qty"),100000),COUNTIFS(A$2:A2,A2))))

=IF(CV2="","",INDEX(Sheet2!$A$2:$K$8,MATCH(Sheet1!A2,Sheet2!A$2:A$8,0),SMALL(IFERROR(COLUMN($A$1:$K$1)/(LEFT(Sheet2!$A$1:$K$1,3)="Pri"),100000),COUNTIFS(A$2:A2,A2))))

I've also posted this at(both postings have a sample workbook you could view):
https://chandoo.org/forum/threads/help-with-an-array-formula.37481/
https://www.excelforum.com/excel-general/1221268-array-formula-help.html#post4850125
 
Last edited:

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Re: Array formula please help

Try stepping through the calculation and seeing which specific part of the formula results in an error then focus on that. You can highlight parts of the formula and press F9 to see what a nested function results in.
 
Upvote 0
Re: Array formula please help

Try stepping through the calculation and seeing which specific part of the formula results in an error then focus on that. You can highlight parts of the formula and press F9 to see what a nested function results in.

Okay...I'll give that a shot. I know it's worked fine before that only change I made as adding two extra columns to sheet2 but I adjusted for that in the formula so it has me confused at the moment.
 
Upvote 0
Re: Array formula please help

solved

=INDEX(Sheet2!$B$2:$K$8,MATCH($A2,Sheet2!$A$2:$A$8,0),SMALL(IF(LEFT(Sheet2!$B$1:$K$1)=T$1,COLUMN(Sheet2!$B$1:$K$1)-1),COUNTIF($A$2:$A2,$A2)))
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,314
Members
452,634
Latest member
cpostell

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