How to Repeat a Value Every Few Months in Excel Using Formulas
Question details
The user needs an Excel formula to populate a fixed value at specific monthly intervals within a defined date range based on cell references.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Creating a financial model, budget, or schedule where a recurring value needs to appear only in certain months based on a specified interval.
- Observed behavior
- The goal is to display the fixed value in the target months and leave the cells blank for the other months without manual data entry.
Ensure your start and end dates are properly formatted as Excel date values and your interval is entered as a whole number (e.g., 3 for quarterly).
Use IF, MOD, and DATEDIF to Calculate Monthly Intervals
Combine logical and date functions to check if a target month falls within your date range and matches the required interval.
This formula checks two conditions: first, whether the current column's date is within the start and end dates using the OR function. If it is outside the range, it returns a blank. Second, it uses DATEDIF to find the number of months passed and MOD to see if that number is a perfect multiple of your interval.
Ensure your data is organized with the Start Date in C5, End Date in D5, Interval in months in B5, and the Value to repeat in E5. Place your timeline dates in the header row starting at G1.
Select the first cell in your timeline (e.g., G5) and enter the following formula: =IF(OR(G$1<$C5,G$1>$D5),"",IF(MOD(DATEDIF($C5,G$1,"m"),$B5),"",$E5))
Press Enter to apply the formula, then click and drag the fill handle across the row to automatically populate the recurring value into the appropriate months.

Use Power Query for Advanced Data Modeling
For complex datasets or if you want to avoid heavy formulas, Power Query can dynamically generate rows for each required month.
Easily Manage Recurring Monthly Data with WPS Spreadsheet
WPS Spreadsheet provides a robust, free spreadsheet application that fully supports advanced Excel functions like DATEDIF, MOD, and IF. You can seamlessly create project timelines, financial models, and recurring budgets with 100% compatibility.
- 1. Open your workbook in WPS Spreadsheet: Launch WPS Office and open your existing Excel (.xlsx) file containing your timeline and schedule variables.
- 2. Enter the interval formula: Navigate to the first timeline cell and input the combined IF and DATEDIF formula to calculate the monthly gap.
- 3. Apply across the timeline: Drag the fill handle across the columns to instantly populate the recurring values for the required months.
- 4. Save and share: Save your document in .xlsx format to ensure it remains completely compatible with other spreadsheet software.

Frequently Asked Questions
Why does the DATEDIF function give a #NUM! error?
The #NUM! error in DATEDIF usually occurs if the start date is later than the end date. Ensure your formula references correctly place the earlier date first (e.g., DATEDIF(StartDate, EndDate, "m")).
How can I repeat a value every week instead of every month?
For weekly intervals, you do not need DATEDIF. You can subtract the start date from the current timeline date to get the number of days, then use the MOD function with an interval multiplied by 7 (e.g., MOD(TimelineDate - StartDate, 7 * Interval)).
Can I use the EDATE function to find the exact recurring months?
Yes, you can use EDATE to add a specific number of months to a start date. By combining EDATE with the SEQUENCE function in newer versions of Excel, you can dynamically generate an exact list of all recurring dates within a range.
Why are my timeline dates showing up as random numbers like 44000?
Spreadsheets store dates as serial numbers. If your timeline headers look like a 5-digit number instead of a date, select the cells, right-click, choose 'Format Cells', and apply a 'Date' format.




