# Stop ranges within formula from moving when a new row is added

#### ThomG

##### New Member
My array formula below works BUT, I think I need to apply maybe an INDIRECT function to stop the ranges from moving when I add a new row to my data set. Can anyone help?

{=IFERROR(INDEX('EIRF Tracker '!\$N\$9:\$N\$2000,MODE(IF('EIRF Tracker '!\$G\$9:\$G\$2000="Injury",IF('EIRF Tracker '!\$B\$9:\$B\$2000="2018-19",IF('EIRF Tracker '!\$C\$9:\$C\$2000=C54,IF('EIRF Tracker '!\$N\$9:\$N\$2000<>"0",MATCH('EIRF Tracker '!\$N\$9:\$N\$2000,'EIRF Tracker '!\$N\$9:\$N\$2000,{0,0}))))))),"None")}

Gem

### Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
My array formula below works BUT, I think I need to apply maybe an INDIRECT function to stop the ranges from moving when I add a new row to my data set. Can anyone help?

{=IFERROR(INDEX('EIRF Tracker '!\$N\$9:\$N\$2000,MODE(IF('EIRF Tracker '!\$G\$9:\$G\$2000="Injury",IF('EIRF Tracker '!\$B\$9:\$B\$2000="2018-19",IF('EIRF Tracker '!\$C\$9:\$C\$2000=C54,IF('EIRF Tracker '!\$N\$9:\$N\$2000<>"0",MATCH('EIRF Tracker '!\$N\$9:\$N\$2000,'EIRF Tracker '!\$N\$9:\$N\$2000,{0,0}))))))),"None")}

Gem
Everywhere you have a range, just substitute an INDIRECT. For example, the part in red becomes:

INDEX(INDIRECT("'EIRF Tracker '!\$N\$9:\$N\$2000"),

Thanks Eric! I have just attempted this and Excel is telling me I have too few arguments... can you spot anything obvious?

=IFERROR(INDEX(INDIRECT("'EIRF Tracker '!\$N\$9:\$N\$2000"),MODE(IF(INDIRECT("'EIRF Tracker '!\$G\$9:\$G\$2000"="Injury",IF(INDIRECT("'EIRF Tracker '!\$B\$9:\$B\$2000"="2018-19",IF(indirect("'EIRF Tracker '!\$C\$9:\$C\$2000"=C55,IF(indirect("'EIRF Tracker '!\$N\$9:\$N\$2000"<>"0",MATCH(indirect("'EIRF Tracker '!\$N\$9:\$N\$2000",(indirect("'EIRF Tracker '!\$N\$9:\$N\$2000",{0,0}))))))),"None")

Gem

Try:

Code:
``=IFERROR(INDEX(INDIRECT("'EIRF Tracker '!\$N\$9:\$N\$2000"),MODE(IF(INDIRECT("'EIRF Tracker '!\$G\$9:\$G\$2000")="Injury",IF(INDIRECT("'EIRF Tracker '!\$B\$9:\$B\$2000")="2018-19",IF(INDIRECT("'EIRF Tracker '!\$C\$9:\$C\$2000")=C54,IF(INDIRECT("'EIRF Tracker '!\$N\$9:\$N\$2000")<>"0",MATCH(INDIRECT("'EIRF Tracker '!\$N\$9:\$N\$2000"),INDIRECT("'EIRF Tracker '!\$N\$9:\$N\$2000"),{0,0}))))))),"None")``

Success! Thank you kindly

Replies
1
Views
227
Replies
6
Views
164
Replies
0
Views
494
Replies
5
Views
363
Replies
7
Views
257

1,216,297
Messages
6,129,955
Members
449,544
Latest member
Akhil333

### 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.

### Which adblocker are you using?

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

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