Separate the quantity in different columns basis date condition

AtoZexport

New Member
Joined
May 22, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Dear Members,

I am facing a challenge as below where I have multiple dated stock of the same products whereas output report required the sum of Short, medium and long dated stock of each product.

To make it easy below is the sample of my Data and required output report.

Data:
Product NameQuantityBest Before Date
Mango Juice1022/06/2023
Mango Juice2020/09/2023
Mango Juice3017/02/2024
Mango Juice2018/03/2024
Orange Juice4022/03/2023
Orange Juice6018/09/2023
Orange Juice8016/01/2024

Output Report required:
Product NameShort Date (If rem. days are less than 90)Medium Date (If rem. of days >90<150)Long Date (If rem. days >150)
Mango Juice102050
Orange Juice406080

Thank you in advance for your time and solution.
 

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.
How about:

051923 Sum Spreadsheet.xlsm
FGHI
1ShortMediumLong
2Mango Juice102050
3Orange Juice406080
Sheet7
Cell Formulas
RangeFormula
G2:G3G2=SUM(FILTER($B$2:$B$8,($A$2:$A$8=$F2)*($C$2:$C$8-TODAY()<90)))
H2:H3H2=SUM(FILTER($B$2:$B$8,($A$2:$A$8=$F2)*($C$2:$C$8-TODAY()>=90)*($C$2:$C$8-TODAY()<150)))
I2:I3I2=SUM(FILTER($B$2:$B$8,($A$2:$A$8=$F2)*($C$2:$C$8-TODAY()>=150)))
 
Upvote 0
How about:

051923 Sum Spreadsheet.xlsm
FGHI
1ShortMediumLong
2Mango Juice102050
3Orange Juice406080
Sheet7
Cell Formulas
RangeFormula
G2:G3G2=SUM(FILTER($B$2:$B$8,($A$2:$A$8=$F2)*($C$2:$C$8-TODAY()<90)))
H2:H3H2=SUM(FILTER($B$2:$B$8,($A$2:$A$8=$F2)*($C$2:$C$8-TODAY()>=90)*($C$2:$C$8-TODAY()<150)))
I2:I3I2=SUM(FILTER($B$2:$B$8,($A$2:$A$8=$F2)*($C$2:$C$8-TODAY()>=150)))
T

How about:

051923 Sum Spreadsheet.xlsm
FGHI
1ShortMediumLong
2Mango Juice102050
3Orange Juice406080
Sheet7
Cell Formulas
RangeFormula
G2:G3G2=SUM(FILTER($B$2:$B$8,($A$2:$A$8=$F2)*($C$2:$C$8-TODAY()<90)))
H2:H3H2=SUM(FILTER($B$2:$B$8,($A$2:$A$8=$F2)*($C$2:$C$8-TODAY()>=90)*($C$2:$C$8-TODAY()<150)))
I2:I3I2=SUM(FILTER($B$2:$B$8,($A$2:$A$8=$F2)*($C$2:$C$8-TODAY()>=150)))
Thank you.
 
Upvote 0

Forum statistics

Threads
1,223,900
Messages
6,175,276
Members
452,629
Latest member
SahilPolekar

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