Fill an Excel Formula Right While Incrementing Row References
Question details
Fill a cash-flow forecast formula horizontally while advancing through vertically arranged source data.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A forecast runs across columns, while its source values are listed down rows on the Historic Data sheet.
- Observed behavior
- Dragging a normal relative reference to the right changes the source column instead of increasing the source row.
Confirm that the source sheet is named Historic Data, the first source row is 65, and the first forecast cell is C65. If your workbook uses different locations, adjust the sheet name, starting row, and anchored forecast cell in the formula.
Use OFFSET to advance source rows when filling right
Use this formula to advance one source row per forecast column while retaining the original conditional logic.
COLUMN()-COLUMN($C$65) returns 0 in C65, 1 in D65, and so on. OFFSET uses that number to move down from row 65.
The formula returns column I if the column J value is zero; otherwise, it returns column U if column I is zero, or column J if neither condition applies.
On the forecast sheet, select C65 and enter =IF(OFFSET('Historic Data'!$J$65,COLUMN()-COLUMN($C$65),0)=0,OFFSET('Historic Data'!$J$65,COLUMN()-COLUMN($C$65),-1),IF(OFFSET('Historic Data'!$J$65,COLUMN()-COLUMN($C$65),-1)=0,OFFSET('Historic Data'!$J$65,COLUMN()-COLUMN($C$65),11),OFFSET('Historic Data'!$J$65,COLUMN()-COLUMN($C$65),0))).
Drag the fill handle at the lower-right corner of C65 to the right across the forecast cells.
Select D65 and check that its result uses row 66 of Historic Data. The next cell to the right uses row 67.

Use INDEX to pull one source column across
Use INDEX when you only need values from one source column and do not need the conditional checks in the OFFSET formula.
Fill a Horizontal Forecast from Vertical Data in WPS
Open your workbook in WPS Spreadsheets and use INDEX with COLUMN to pull successive source rows across a forecast.
- 1. Open the workbook: Open WPS Spreadsheets and use Open to select your Excel workbook.
- 2. Select the starting cell: On the forecast sheet, select C65 and confirm the source sheet is named Historic Data.
- 3. Enter the formula: Enter =INDEX('Historic Data'!$J:$J,65+COLUMN()-COLUMN($C$65)) in C65 to start pulling values from column J.
- 4. Fill right: Drag the fill handle from C65 across the forecast. Each cell to the right pulls the next source row.
- 5. Save the workbook: Use File > Save or Save As to save the edited workbook in Excel XLSX format.

Frequently Asked Questions
Why does dragging a formula right change the source column?
Excel adjusts relative references in the direction you fill. Use COLUMN() to calculate a row offset and pass it to OFFSET or INDEX instead.
How do I adapt the formula for a different starting cell?
Replace $C$65 with an absolute reference to your first forecast cell. Also change the starting source reference or row number to match your data.
What happens if the source value in column J is zero?
In the OFFSET solution, a zero in column J causes the formula to return the value from column I on the same source row.
Can INDEX reproduce the conditional OFFSET formula?
Yes. Use INDEX references for columns I, J, and U with the same calculated row number, then combine them with IF. The simpler INDEX example on this page returns only column J.




