Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default 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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
auto-hide rows, cell format (# and @), update cell refs, shade cel Mo2 Excel Discussion (Misc queries) 0 April 17th 07 03:44 AM
returning absolute cell refs karl41 Excel Discussion (Misc queries) 3 August 22nd 06 11:59 AM
Why would a pasted formula not calculate the new cell refs? Alison Excel Worksheet Functions 2 April 1st 06 09:55 PM
Vlookup refs a cell that has a worksheet name Peter Excel Worksheet Functions 7 February 6th 06 06:41 PM
How do I fix cell refs when adding rows Dave L Excel Discussion (Misc queries) 5 December 2nd 05 09:52 PM


All times are GMT +1. The time now is 03:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"