An alternative solution is with Power Query
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Filtered Rows" = Table.SelectRows(Source, each ([Type] <> null)),
#"Changed Type" = Table.TransformColumnTypes(#"Filtered Rows",{{"Date", type date}}),
#"Removed Other Columns" = Table.SelectColumns(#"Changed Type",{"Date", "Company", "City", "State", "Amount"}),
#"Grouped Rows" = Table.Group(#"Removed Other Columns", {"Date", "Company", "State", "City"}, {{"Totao", each List.Sum([Amount]), type number}}),
#"Sorted Rows" = Table.Sort(#"Grouped Rows",{{"Date", Order.Ascending}})
in
#"Sorted Rows"
Excel 2016 (Windows) 64 bit
|
G |
H |
I |
J |
K |
4 |
Date |
Company |
State |
City |
Totao |
5 |
5/2/2022 |
GHI Corporation |
CO |
Aurora |
78.61 |
6 |
5/2/2022 |
ABC Inc |
CO |
Denver |
837.9 |
7 |
5/3/2022 |
ABC Inc |
CO |
Denver |
-495 |
8 |
5/9/2022 |
ABC Inc |
CO |
Colorado Springs |
67686.5 |
9 |
5/9/2022 |
ABC Inc |
CO |
Denver |
555.9 |
10 |
5/10/2022 |
GHI Corporation |
CO |
Canon City |
16639.73 |
11 |
5/11/2022 |
ABC Inc |
CO |
Arvada |
208 |
12 |
5/16/2022 |
ABC Inc |
CO |
Vail |
15208.82 |
13 |
5/16/2022 |
ABC Inc |
CO |
Avon |
25961.4 |
14 |
5/16/2022 |
ABC Inc |
CO |
Littleton |
243.53 |
15 |
5/17/2022 |
GHI Corporation |
CO |
Sterling |
12132.79 |
16 |
5/17/2022 |
ABC Inc |
CO |
Arvada |
-208 |
17 |
5/18/2022 |
ABC Inc |
CO |
Colorado Springs |
14801.04 |
18 |
5/18/2022 |
ABC Inc |
CO |
Highlands Ranch |
15127.12 |
19 |
5/18/2022 |
ABC Inc |
CO |
Denver |
13414.78 |
20 |
5/19/2022 |
ABC Inc |
CO |
Carbondale |
837.9 |
21 |
5/24/2022 |
ABC Inc |
WY |
Casper |
14734.01 |
22 |
5/24/2022 |
ABC Inc |
CO |
Frisco |
16865.06 |
23 |
5/24/2022 |
ABC Inc |
CO |
Edwards |
24629 |
24 |
5/24/2022 |
ABC Inc |
CO |
Colorado Springs |
27955.13 |
25 |
5/24/2022 |
ABC Inc |
CO |
Monument |
14168.89 |
26 |
5/25/2022 |
ABC Inc |
CO |
Cotopaxi |
41.16 |
27 |
5/26/2022 |
ABC Inc |
CO |
Estes Park |
298.65 |
28 |
5/27/2022 |
ABC Inc |
CO |
Berthoud |
16057.89 |
29 |
5/27/2022 |
ABC Inc |
CO |
Boulder |
15757.17 |
30 |
5/27/2022 |
ABC Inc |
CO |
Colorado Springs |
33223.47 |
31 |
5/31/2022 |
GHI Corporation |
CO |
Estes Park |
18237.11 |
Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").
It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.
- Follow this link to learn how to install Power Query in Excel 2010 / 2013.
- Follow this link for an introduction to Power Query functionality.
- Follow this link for a video which demonstrates how to use Power Query code provided.
Bookmarks