Row not coming across - formula help!!!

fffzac

New Member
Joined
May 30, 2018
Messages
5
Hi,

I am looking to bring data over from one sheet to another when it matches a certain value on the first sheet. The current formula I am using is:

{=IF(ISERROR(INDEX(Sheet2!$A$2:$K$4970,SMALL(IF(Sheet2!$A$2:$A$4970='Sheet1'!$C$14,ROW(Sheet2!$A$2:$A$4970)),ROW(1:1)),0)),"",INDEX(Sheet2!$A$2:$K$4970,SMALL(IF(Sheet2!$A$2:$A$4970='Sheet1'!$C$14,ROW(Sheet2!$A$2:$A$4970)),ROW(1:1)),5))}

The problem I am having is that the first row of data I need is not coming across to the sheet and the last row of data being brought across is from the next dataset.

I think its something to do with the ROW() but cant work it out.

Any ideas?
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Looks like you're trying to retrieve a value if it exists else return blank.

Try

non array formula
=IFERROR(INDEX(Sheet2!A$2:A$4970,AGGREGATE(15,6,ROW(Sheet2!A$2:A$4970)/(Sheet2!A$2:A$4970=Sheet1!$C$14),ROWS(A$2:A4970)),1),"")

or array formula
=IFERROR(INDEX(Sheet2!$A$2:$A$4970,SMALL(IF((Sheet2!$A$2:$A$4970=Sheet1!$C$14),ROW($A$2:$A$4970)),ROW(A1))-(ROW(A$2)-1),1),"")
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,687
Members
449,117
Latest member
Aaagu

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