LuckyDPR
New Member
- Joined
- Aug 6, 2022
- Messages
- 12
- Office Version
- 2021
- Platform
- Windows
Formula in Column D (Table Column DayNo) is =DAY([@[Start Date]])
Formula in Column F (Table Column QTYon15th) is =SUMPRODUCT((
Code:
=[@Code])*([Start Date]>=(EOMONTH([@[Start Date]],-1)+1))*([Start Date]<=[@[End Date]])*([DayNo]=MAXIFS([DayNo],[Code],[@Code],[Start Date],">="&(EOMONTH([@[Start Date]],-1)+1),[Start Date],"<="&[@[End Date]],[DayNo],"<"&16)),[Qty])
Formula in Column G (Table Column QTYon15th-2) is =INDEX([Qty],MATCH(LARGE(([Code]=[@Code])*([Start Date]>=(EOMONTH([@[Start Date]],-1)+1))*([Start Date]<=[@[End Date]])*([DayNo]<16)*[DayNo],1),([Code]=[@Code])*([Start Date]>=(EOMONTH([@[Start Date]],-1)+1))*([Start Date]<=[@[End Date]])*([DayNo]<16)*[DayNo],0))
Formula in Column F and Column G are oriented for same purpose (just different approach), as one can see that these formulas are overly complicated, so i am wondering if there is a way to achieve same result with much simpler approach