Only Return a Value if it is Greater than Equal to Start Date, but stop when the End Date is Reached

PWH1968

New Member
Joined
Nov 10, 2022
Messages
12
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Morning All :p

Today's query is: I have Sales figures that have occurred between Start and End Dates and what I want to show is which Month they Start and End on.

So in this particular scenario, some products (Rows 15 & 16 sales commenced Dec'22 and Jan'23, whereas rows 4-14 didn't start until Feb'23). ALL Sales ceased in Jan'25 so the formula needs to stop at column AB as column AC onwards is not applicable) please see below as this explanation is probably rubbish.

ONS-BOS Levy Calculator.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKAL
1ANTICIPATED TCV
2Y1Y2Y3
3SKUPILLAR1-Dec-20221-Jan-20231-Feb-20231-Mar-20231-Apr-20231-May-20231-Jun-20231-Jul-20231-Aug-20231-Sep-20231-Oct-20231-Nov-20231-Dec-20231-Jan-20241-Feb-20241-Mar-20241-Apr-20241-May-20241-Jun-20241-Jul-20241-Aug-20241-Sep-20241-Oct-20241-Nov-20241-Dec-20241-Jan-20251-Feb-20251-Mar-20251-Apr-20251-May-20251-Jun-20251-Jul-20251-Aug-20251-Sep-20251-Oct-20251-Nov-2025
4B91079ERP $ 4,243$ 4,243$ 4,243$ 4,243$ 4,243$ 4,243$ 4,243$ 4,243$ 4,243$ 4,243$ 4,243$ 4,243$ 4,243$ 4,243$ 4,243$ 4,243$ 4,243$ 4,243$ 4,243$ 4,243$ 4,243$ 4,243$ 4,243$ 4,243
5B91082ERP $ 5,391$ 5,391$ 5,391$ 5,391$ 5,391$ 5,391$ 5,391$ 5,391$ 5,391$ 5,391$ 5,391$ 5,391$ 5,391$ 5,391$ 5,391$ 5,391$ 5,391$ 5,391$ 5,391$ 5,391$ 5,391$ 5,391$ 5,391$ 5,391
6B91080ERP $ 12,268$ 12,268$ 12,268$ 12,268$ 12,268$ 12,268$ 12,268$ 12,268$ 12,268$ 12,268$ 12,268$ 12,268$ 12,268$ 12,268$ 12,268$ 12,268$ 12,268$ 12,268$ 12,268$ 12,268$ 12,268$ 12,268$ 12,268$ 12,268
7B91083ERP $ 7,361$ 7,361$ 7,361$ 7,361$ 7,361$ 7,361$ 7,361$ 7,361$ 7,361$ 7,361$ 7,361$ 7,361$ 7,361$ 7,361$ 7,361$ 7,361$ 7,361$ 7,361$ 7,361$ 7,361$ 7,361$ 7,361$ 7,361$ 7,361
8B85800HCM $ 14,568$ 14,568$ 14,568$ 14,568$ 14,568$ 14,568$ 14,568$ 14,568$ 14,568$ 14,568$ 14,568$ 14,568$ 14,568$ 14,568$ 14,568$ 14,568$ 14,568$ 14,568$ 14,568$ 14,568$ 14,568$ 14,568$ 14,568$ 14,568
9B75365HCM $ 2,914$ 2,914$ 2,914$ 2,914$ 2,914$ 2,914$ 2,914$ 2,914$ 2,914$ 2,914$ 2,914$ 2,914$ 2,914$ 2,914$ 2,914$ 2,914$ 2,914$ 2,914$ 2,914$ 2,914$ 2,914$ 2,914$ 2,914$ 2,914
10B84490HCM $ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248
11B84490HCM $ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248
12B84490HCM $ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248$ 1,248
13B87368HCM $ 2,496$ 2,496$ 2,496$ 2,496$ 2,496$ 2,496$ 2,496$ 2,496$ 2,496$ 2,496$ 2,496$ 2,496$ 2,496$ 2,496$ 2,496$ 2,496$ 2,496$ 2,496$ 2,496$ 2,496$ 2,496$ 2,496$ 2,496$ 2,496
14B94925HCM $ 6,799$ 6,799$ 6,799$ 6,799$ 6,799$ 6,799$ 6,799$ 6,799$ 6,799$ 6,799$ 6,799$ 6,799$ 6,799$ 6,799$ 6,799$ 6,799$ 6,799$ 6,799$ 6,799$ 6,799$ 6,799$ 6,799$ 6,799$ 6,799
15B73946EPM$ 629$ 629$ 629$ 629$ 629$ 629$ 629$ 629$ 629$ 629$ 629$ 629$ 629$ 629$ 629$ 629$ 629$ 629$ 629$ 629$ 629$ 629$ 629$ 629$ 629$ 629
16B79785EPM$ 634$ 634$ 634$ 634$ 634$ 634$ 634$ 634$ 634$ 634$ 634$ 634$ 634$ 634$ 634$ 634$ 634$ 634$ 634$ 634$ 634$ 634$ 634$ 634$ 634$ 634
17$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -
18$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -$ -
Formula Calculations
Cell Formulas
RangeFormula
C3C3=+MIN(BOS_Levy_Calculator[Start Date])
D3:AL3D3=+EDATE(C3,1)
A4:A203A4=+IF(BOS_Levy_Calculator[SKU '#]=+"","",BOS_Levy_Calculator[SKU '#])
B4:B203B4=+IF(BOS_Levy_Calculator[Pillar]=+"","",BOS_Levy_Calculator[Pillar])
C4:AB203C4=+IF(C$3>=+BOS_Levy_Calculator[Start Date],BOS_Levy_Calculator[Actual Monthly Charge],"")
AC4:AL203AC4=+IF(AC$3<=+BOS_Levy_Calculator[End Date],BOS_Levy_Calculator[Actual Monthly Charge],"")
Dynamic array formulas.
Excel Formula:
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
It's great that you used XL2BB to post the data, but I had to use Values & Formats only to copy it because the formulas were a mess as "BOS_Levy_Calculator" isn't there,
Also, using Merge & Center is a great way to screw up a worksheet's structure. Instead use Center Across Selection under Format Cells -> Alignment -> Horizontal drop down (and I recommend putting a thin outside border with the selection too as there's no indication of what cells are being used for the centering).
 
Upvote 0
Thanks for the formatting tips but what about my actual question - do you have a solution please?
 
Upvote 0

Forum statistics

Threads
1,224,821
Messages
6,181,163
Members
453,021
Latest member
Justyna P

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