How to Place an Excel Value at a Dynamic Row and Column
Question details
The user wants to write a calculated value into a dynamically changing cell address based on specific row and column numbers.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Attempting to output data to varying cell locations dynamically, rather than pulling data into a single fixed formula cell.
- Observed behavior
- Standard worksheet functions like INDEX, MATCH, or ADDRESS calculate and display values in their own cells, but they cannot actively write or push those results into a different, arbitrary cell address.
Ensure you have the Developer tab enabled in your spreadsheet application, as you will need access to the VBA Editor to push values to dynamic cell locations.
Use a VBA Macro to Write Values Dynamically
Since built-in formulas cannot push data to arbitrary cells, writing a VBA script using the Cells(row, column) property is the necessary method for dynamic placement.
VBA provides the flexibility to assign specific row and column variables, calculate your data, and push the result exactly where you need it. This overcomes the read-only limitation of standard worksheet formulas.
Press Alt + F11 on your keyboard to open the VBA Editor, then go to Insert > Module to create a new script window.
Start your subroutine and declare your variables, for example: Dim i As Integer, j As Integer. Assign dynamic values to them based on your logic (e.g., i = 2, j = 5).
Use the Cells property to push your data. Type: Worksheets("Sheet1").Cells(i, j).Value = "Your_Target_Value".
Press F5 or click the Run button to execute the script and write the value into the specified dynamic row and column.

Redesign Your Table to Pull Data via Formulas
If you prefer to avoid VBA entirely, you must restructure your spreadsheet so that the target cells themselves contain formulas to pull the dynamic data.
Automate Dynamic Cell Values Easily with WPS Spreadsheets
WPS Spreadsheets provides comprehensive support for VBA macros, allowing you to effortlessly write data to dynamic rows and columns. Enjoy advanced spreadsheet automation within a lightweight, highly compatible environment.
- 1. Open WPS Spreadsheets: Launch WPS Office and open your data workbook.
- 2. Access the Developer Tools: Navigate to the 'Developer' tab on the top ribbon.
- 3. Launch the VBA Editor: Click the 'VBA Editor' button to access your macro scripts.
- 4. Run Your Dynamic Script: Input your dynamic cell referencing script and click 'Run' to populate your table.

Frequently Asked Questions
Can I use the ADDRESS function to place a value in a specific cell?
No. The ADDRESS function only returns a text reference (like "$A$1") for a given row and column number. It cannot push, write, or alter the actual value located at that reference.
Why can't I push data to another cell using Excel formulas?
By design, worksheet formulas can only calculate and return a result to the specific cell where the formula itself resides. They are read-only when interacting with other cells and cannot modify external content.
Are VBA macros for dynamic cell placement compatible with WPS Office?
Yes, WPS Office offers excellent support for VBA macros. You can run most standard VBA scripts, including those utilizing the Cells(row, column) property, directly in WPS Spreadsheets.




