Spreadsheet: 887038d1737126344-sumif-sort-unique-help-sample_011725-1-
Sheet: Travel

 |  |  |  |  |  |  |  |  |  |  |  |  |  | Based on Budget column
 |  | Travel |  |  |  |  |  |  | Department | Forecast | Actual | Budget | variance to actuals | rank | Category
 |  | Description |  | 2024 Actuals | 2024 F | 2025 B | 2024 Actuals v 2025 Plan |  | DEPT 1 | 799596.5005 | 698731.92 | 1948613.507600001
 |  | Dept 1 |  | 0.6987319200000001 | 0.7995965005 | 1.948613507600001 | 1.249881587600001 |  | SK OFFICE | 1572630.465700001 | 1419614.599999999 | 1589143.667500001
 | 2 | Sk Office |  | 1.419614599999999 | 1.572630465700001 | 1.589143667500001 | 0.1695290675000014 |  | FRATERNAL MISSION | 661110.2006000001 | 704641.8299999997 | 879500.0023999985
 | 3 | Fraternal Mission |  | 0.7046418299999997 | 0.6611102006000001 | 0.8795000023999985 | 0.1748581723999988 |  | SPECIAL EVENTS | 455229.6400000001 | 739259.4899999998 | 662867.0004000007
 | 4 | Other |  | 0.4670905800000003 | 0.456389413 | 0.8337116989 | 0.3666211188999997 |  | CORPORATE COMMUNICATIONS | 298081.97 | 296770.7300000002 | 378787.9992
 | 5 | Special Events |  | 0.7392594899999998 | 0.45522964 | 0.6628670004000007 | -0.07639248959999911 |  | MONEY MEN | 74210.79979999996 | 82779.78999999998 | 114000
 |  |  |  |  |  |  |  |  | SALES | 67196.37000000001 | 65176.39000000001 | 107000.0004
 |  |  |  |  |  |  |  |  | BOUNCERS | 44400.17999999999 | 49777.80999999999 | 50000.00040000001
 |  |  |  |  |  |  |  |  | FAKE DEPARTMENT | 14598.4799 | 19838.85 | 49000.00009999999
 |  |  |  |  |  |  |  |  | ACTUARIAL | 28773.70000000001 | 25231.33000000001 | 28773.70000000001
 |  |  |  |  |  |  |  |  | HR | 29738.5099 | 30415.64999999999 | 28200
 |  |  |  |  |  |  |  |  | IT KNUCKLEHEADS | 12264.07 | 9962.599999999999 | 20000.0004
 |  |  |  |  |  |  |  |  | RISK MANAGEMENT | 3006.403299999999 | 2732.18 | 17499.9996
 |  |  |  |  |  |  |  |  | PUBLIC POLICY | 31553.18000000001 | 37254.24999999999 | 10750
 |  |  |  |  |  |  |  |  | PROCUREMENT | 3081.47 | 3439.93 | 9999.999600000001
 |  |  |  |  |  |  |  |  | LEGAL | 21479.58010000001 | 8557.83 | 8999.998800000007
 |  |  |  |  |  |  |  |  | ACCOUNTING | -178395.32 | -172764.08 | 6000
 |  |  |  |  |  |  |  |  | MARKETING | 1905.55 | 1905.55 | 3500.000400000003
Notes: |  |  |  |  |  |  |  |  | MEDICAL | 1963.27 | 2068.27 | 800.0004
Cell C* starts a list of unique departments.  Need to sum all the budget data for the listing. |  |  |  |  |  |  |  |  | FACILITIES | 499.6 | 500.4 | 399.9996000000001
Needes to be sorted High to Low based on column G |  |  |  |  |  |  |  |  | THAT OTHER DEPARTMENT | 2031.6 | 2031.6 | 0
 |  |  |  |  |  |  |  |  | MEMBERSHIP |  | 1411.5 | 0
 |  |  |  |  |  |  |  |  | Rank = 2025 Budget
 |  |  |  |  |  |  |  |  | 5
 |  |  |  |  |  |  |  |  | Users input of how many departments they want to see.
 |  |  |  |  |  |  |  |  | This will change the column "Category" accordingly
 |  |  |  |  |  |  |  |  | This input will also create a sequence of numbers in column B
Work in process formulas:
=SUMIF(Table4[Category], XLOOKUP(B8, Table4[Category], Table4[Budget]), Table4[Budget])
=SUMIFS(Table4[Budget], Table4[Category], XLOOKUP(C8, Table4[Category], Table4[Budget]), C:C, XLOOKUP("criteria2", F:F, G:G))