ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Variable Cell Refs (https://www.excelbanter.com/excel-programming/296586-variable-cell-refs.html)

Craig[_15_]

Variable Cell Refs
 
How can I change the cell ref of a formula to one that is stored in another
cell?
e.g. I want to do a

COUNTIF(B1:B*x*,"0")

where the value of *x* has been manually input in A1

TIA
Craig



Chip Pearson

Variable Cell Refs
 
Craig,

Use the INDIRECT function to convert a text string in to an
actual range address:

=COUNTIF(INDIRECT("B1:B"&A1),"0")

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Craig" wrote in message
...
How can I change the cell ref of a formula to one that is

stored in another
cell?
e.g. I want to do a

COUNTIF(B1:B*x*,"0")

where the value of *x* has been manually input in A1

TIA
Craig





Juan Pablo González

Variable Cell Refs
 
Try with

=COUNTIF(B1:INDEX(B:B, A1); "0")

--
Regards,

Juan Pablo González

"Craig" wrote in message
...
How can I change the cell ref of a formula to one that is stored in

another
cell?
e.g. I want to do a

COUNTIF(B1:B*x*,"0")

where the value of *x* has been manually input in A1

TIA
Craig






All times are GMT +1. The time now is 08:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com