Forum Discussion
Formula
- Jul 10, 2023
Hi espy325,
to use a variable as the address of a cell in a formula, you can use the INDIRECT function.
Here's an example of how you can adjust your formula using INDIRECT:
=AMOUNT PAID - INDIRECT("'NOOTBOOK1'!" & X)
The INDIRECT function converts the text in X into a cell reference and retrieves the value of the cell referenced by X.
You need to replace the workbook name and sheet name in the formula with the actual names in your environment. Additionally, verify that the cell reference stored in X follows the correct format (e.g., "A1", "B5", etc.).
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Kindest regards
Leon Pavesic
Hi espy325,
to use a variable as the address of a cell in a formula, you can use the INDIRECT function.
Here's an example of how you can adjust your formula using INDIRECT:
=AMOUNT PAID - INDIRECT("'NOOTBOOK1'!" & X)
The INDIRECT function converts the text in X into a cell reference and retrieves the value of the cell referenced by X.
You need to replace the workbook name and sheet name in the formula with the actual names in your environment. Additionally, verify that the cell reference stored in X follows the correct format (e.g., "A1", "B5", etc.).
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Kindest regards
Leon Pavesic