Pivot table question

floggingmolly

Board Regular
Joined
Sep 14, 2019
Messages
167
Office Version
  1. 365
Platform
  1. Windows
I have a worksheet with 3 columns. Column A and B are dates, and column C is an ID#. Column A has a start date, B is end date. For example Column A1-A7 is 1/3/2022, Column B1-B7 is 1/10/2022, and so on. I need a pivot table that shows like this:
Begin Date End Date # of IDs
1/3/2021 6/3/2022 5
1/10/2021 6/10/2022 7
1/17/2021 6/17/2022 20
and so on fir each date range. I can't figure out how to get the Begin Date and end date in 2 columns beside each other in the pivot table. Any help would be appreciated.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Map1
ABCDEFGHIJK
1startendIDminma 01/03/22startnumber
2ma 01/03/22vr 06/03/225maxvr 06/17/22ma 01/03/221
3ma 01/10/22vr 06/10/227166di 01/04/221
4ma 01/17/22vr 06/17/2220wo 01/05/221
5do 01/06/221
6vr 01/07/221
7za 01/08/221
8zo 01/09/221
9ma 01/10/222
10di 01/11/222
Blad1
Cell Formulas
RangeFormula
I2:I167I2=SEQUENCE(G3,,G1)
G1G1=MIN(Tabel1[[start]:[end]])
G2G2=MAX(Tabel1[[start]:[end]])
G3G3=+G2-G1+1
J2:J10J2=SUMPRODUCT((Tabel1[start]<=I2)*(I2<=Tabel1[end]))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,214,922
Messages
6,122,281
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top