Need help to expand my look up range in a very long (and probably over complex) index formula with array

saraapple

Board Regular
Joined
Feb 3, 2020
Messages
165
Office Version
  1. 2010
Platform
  1. Windows
This is my formula which works!

{=IFERROR(INDEX('3.PASTE PARAGON 2'!$B$2:$E$346,SMALL(IF('3.PASTE PARAGON 2'!$B$2:$E$346=$C2,ROW('3.PASTE PARAGON 2'!$B$2:$E$346)-1),COLUMNS($K2:K2)),4),"")}

It basically changes data from a column to a row in a new sheet.
Data changes every day so this is updated in the sheet '3.PASTE PARAGON 2' my problem is the data in this sheet can go beyond row 346 - I want it to capture the whole sheet but when I change the B2:E346 to B:E the formula stops working.

I am currently pulling it apart to try and figure out where I have gone wrong and wondered if it was something simple I am not seeing?

Any help gratefully appreciated.
Sara
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
How about
Excel Formula:
=IFERROR(INDEX('3.PASTE PARAGON 2'!$B$2:$E$1000,SMALL(IF('3.PASTE PARAGON 2'!$B$2:$E$1000=$C2,ROW('3.PASTE PARAGON 2'!$B$2:$E$1000)-1),COLUMNS($K2:K2)),4),"")
 
Upvote 0
Solution
Thank you for taking a look.
{=INDEX('3.PASTE PARAGON 2'!$B$2:$E$1000,SMALL(IF('3.PASTE PARAGON 2'!$B$2:$E$1000=$C2,ROW('3.PASTE PARAGON 2'!$B$2:$E$1000)-1),COLUMNS($K2:K2)),4)}
I took out the IFERROR and it gives me a #N/A

If I increase the E346 +1 its starts #N/A

The current data in my sheet ends at row 346 which has the be the reason - what if tomorrows data has 500 rows or less than 346 - this will cause my formula to fail?
 
Upvote 0
If you are getting a #N/A error, that would suggest you have that error in the original data.
 
Upvote 0
You are right - there was a #NA line in my data.
Added and IFERROR so all my formulas can run and not cause problems to row 1000.
Thank you for pointing me in the right direction :)
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,797
Messages
6,121,629
Members
449,041
Latest member
Postman24

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