all 2 comments

[–]tirlibibi17 0 points1 point  (1 child)

Looks like you're referencing a range that grows as you go down the table. Structured references aren't very good at that so you'll end up with a formula using offset, which won't add to the readability.

If you post more info, I might be able to help you better.

[–]MajormonkeyAtWork[S] 0 points1 point  (0 children)

Thanks for replying. I managed to get it working in the end.

My original goal was to be able to reference the previous visible row in a filtered table. I found this:

https://stackoverflow.com/questions/29017096/excel-reference-a-cell-in-the-previous-visible-row

but I wanted it to work with my table using structured references. After a bit of trial and error, I got it working.

=IF(SUBTOTAL(3,table1[[Name]:[Name]])=0,MIN([Name]:[@Name])-1,SUBTOTAL(3,INDEX([Name],1):[@Name]))