I have a table with two columns. The table is in columns A and B of a worksheet called "Categories"
The first column, "Category" is fixed text.
The second column"Date used" is calculated from category. The formula in cell B2 looks like this... =MAXIFS(Transactions!$C$10:C$25000,Transactions!$B$10:B$25000,Categories!$A2)
My problem is that I want to sort the table by Date used. When I do this the relative references (Categories!$A2) do not update to match the new row that the cell is in. So all the dates are in the wrong rows.
Sorting a Table with relative references
-
- Administrator
- Posts: 12604
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe
-
- Administrator
- Posts: 78478
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Sorting a Table with relative references
I assume that you either selected a cell in the Date Used column or the entire table before you sorted.
If you do it that way, the categories and dates will be moved together, and the formula in B2 should still refer to $A2.
If you just sort the date column, the dates won't match the categories anymore.
If you do it that way, the categories and dates will be moved together, and the formula in B2 should still refer to $A2.
If you just sort the date column, the dates won't match the categories anymore.
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans
Hans
-
- Administrator
- Posts: 12604
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe
Re: Sorting a Table with relative references
I tried selecting the whole table, as well as selecting a single cell in the table, but it didn't help...
You do not have the required permissions to view the files attached to this post.
StuartR
-
- Administrator
- Posts: 78478
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Sorting a Table with relative references
Ah - try removing "Categories!" from "Categories!$A2"
=MAXIFS(Transactions!$C$10:C$25000,Transactions!$B$10:B$25000,$A2)
=MAXIFS(Transactions!$C$10:C$25000,Transactions!$B$10:B$25000,$A2)
Best wishes,
Hans
Hans
-
- Administrator
- Posts: 12604
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe