Dynamic Formula (repeating the formula)

papare

New Member
Joined
Nov 24, 2013
Messages
26
I would like to repeat a formula and make its dynamic depending on the request.
The formular that I would like to repeat is:

=IF(ISERROR(INDEX(Data!$A$2:$G$14997,SMALL(IF(Data!$A$2:$A$14997=$D$2,ROW(Data!$A$2:$A$14997)),ROW(985:985))-1,3)),"",INDEX(Data!$A$2:$G$14997,SMALL(IF(Data!$A$2:$A$14997=$D$2,ROW(Data!$A$2:$A$14997)),ROW(985:985))-1,3))

Looking forward to your assistance
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi,
what version of excel are you using?
what dynamism are you requiring?
 
Upvote 0
Some questions/comments, in no particular order:

- Are you using Excel 2007 or later? If so, you can use the much simpler IFERROR(YourFormula,"") construction, i.e. rather than IF(ISERROR(YourFormula),"",YourFormula)

- I'm not clear why are you using Row(985:985) rather than a simple 985?

- It looks like your formula returns a value from Data!$A$2:$G$14997 based on the 985th occurrence of the value in $D$2?

You can easily make the 985 dynamic, e.g. by referring to a cell where you can vary this value.

So my guess is that your question distils down to wanting to make Data!$A$2:$G$14997 dynamic?

Assuming the data will always be anchored in A2, and that A1 is a header, you could, for example, define:

NoRows =COUNTA(Data!A:A) - 1 (Assuming data has no blanks in Column A)
NoCols = 7 (say)

then using Name Manager, define:

MyRange =OFFSET(INDIRECT("Data!A2"),,,NoRows,NoCols)

Your formula can then refer to MyRange instead of Data!$A$2:$G$14997
 
Upvote 0

Forum statistics

Threads
1,215,136
Messages
6,123,243
Members
449,093
Latest member
Vincent Khandagale

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