Dec 26 2021 03:49 PM
I have a worksheet that performs a lookup to another sheet to count how many items of the type are there.
Anyone familiar with disc golf will recognise what I have in the image below. The only formula is for stock, everything else is static data. For instance cell G2 contains: =COUNTIF(Master!B:B,'Flight Numbers'!B2) The sheet we're looking at is 'Flight Numbers' and 'Master' contains one line for each item currently in stock.
I regularly want to re-order the page using the filter buttons, but when I do, the stock values get mucked up as they stick with the row number they had prior to any re-order.
What I'm seeking is a way to structure the formula so that it has some kind of reference to "current column minus 5" - is that possible?
Thanks...
Dec 26 2021 04:04 PM
Dec 26 2021 04:05 PM
Dec 26 2021 04:10 PM
Dec 26 2021 05:10 PM
@Peter Bartholomew sorry, that didn't work. I created the table (those alternating stripes are annoying... but, no matter), but when I sorted on a column with the automatically applied filter tool, the cell retained the formula reference for the location it had before the sort, rather than the cell five to the right of its current position.
Dec 26 2021 06:35 PM
Dec 27 2021 02:17 AM
It appears that we have very different work practices, but my best guess as to the formula you require might be as shown in the image
I have applied your Sheet names to the Tables and used them in preference to references to the Tabs. As you might observe, I always format Tables to 'White, Table Style Light 1' and deselect Banded Rows. I would normally deselect Filter Buttons too but that is not what you require. The criterion value is looked up by column name and the particular value is part of the current record. The criterion Range is the entire column of the Master Table.
This should be robust to any sorting or the insertion of rows or columns, but If it is not what you require then either I or @NowshadAhmed may provide further assistance.