Help with using Offset for Row #REF error

Barbz

New Member
Joined
Jan 14, 2019
Messages
4
Hi Everyone and thank you in advance for your help.

I have this complex (for me) formula on a large spreadsheet. As part of the process I must create copies of the spreadsheet with only the rows that meet "manager" as criteria.
This means I'm often deleting the first row of data which then results in a #Ref error in formula in below in the area I've made bold.

=IFERROR(IF(J142="","",INDEX($A$2:$A$126,AGGREGATE(15,6,(ROW($N$2:$N$126)-ROW($N$2)+1)/($N$2:$N$126=L142),COUNTIF($L$142:L142,L142))))," ")

I know I can use OFFSET but I'm not sure how or where to apply it in this particular formula. Or if it will work in this formula.

Any assistance is very appreciated.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,884
Hi
Welcome to the board

Instead of

... ,(ROW($N$2:$N$126)-ROW($N$2)+1)/ ...

try

... ,(ROW($N$2:$N$126)-MIN(ROW($N$2:$N$126))+1)/ ...
 

Barbz

New Member
Joined
Jan 14, 2019
Messages
4
Thank you so much PGC. The change works perfectly. And now I have something new to learn about; the MIN function. I've been researching for days and never came across this as a possible solution. So I can't tell you how much your quick response means to me. Thanks again! :biggrin:
 

Watch MrExcel Video

Forum statistics

Threads
1,129,463
Messages
5,636,427
Members
416,918
Latest member
twc2c

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
Top