#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default Substitution

When defining a range can you use a reference instead of the actual value?

countif(m6:m429,"ION")

Can I replace the 429 with a reference to a cell containing the 429?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Substitution

=countif(indirect("m6:M" & a1),"ION")
or
=countif(m6:indirect("M" & a1),"ION")

In the second one, the m6 will adjust if you copy the formula.

Mitchell wrote:

When defining a range can you use a reference instead of the actual value?

countif(m6:m429,"ION")

Can I replace the 429 with a reference to a cell containing the 429?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default Substitution

I'm getting an evaluation error.

cell A42 contains the number 429

countif(Tasks!M6:indirect("M" & A42),"ION")
countif(Tasks!M6:indirect("M" & 429), "ION")
countif(Tasks!M^:indirect("M429"),"ION")
countif(Tasks!$M$6:$M$429,"ION")

The next evaluation will result in an error. It looks correct????


"Dave Peterson" wrote:

=countif(indirect("m6:M" & a1),"ION")
or
=countif(m6:indirect("M" & a1),"ION")

In the second one, the m6 will adjust if you copy the formula.

Mitchell wrote:

When defining a range can you use a reference instead of the actual value?

countif(m6:m429,"ION")

Can I replace the 429 with a reference to a cell containing the 429?


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Substitution

=countif(indirect("Tasks!M6:M" & A42),"ION")
or
=countif(Tasks!M6:indirect("tasks!M" & A42),"ION")

It would have been better to include the Tasks! stuff on your first post <bg.



Mitchell wrote:

I'm getting an evaluation error.

cell A42 contains the number 429

countif(Tasks!M6:indirect("M" & A42),"ION")
countif(Tasks!M6:indirect("M" & 429), "ION")
countif(Tasks!M^:indirect("M429"),"ION")
countif(Tasks!$M$6:$M$429,"ION")

The next evaluation will result in an error. It looks correct????

"Dave Peterson" wrote:

=countif(indirect("m6:M" & a1),"ION")
or
=countif(m6:indirect("M" & a1),"ION")

In the second one, the m6 will adjust if you copy the formula.

Mitchell wrote:

When defining a range can you use a reference instead of the actual value?

countif(m6:m429,"ION")

Can I replace the 429 with a reference to a cell containing the 429?


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default Substitution

I did some experimentation and found that the 1st solution listed worked, the
second one did not.

"Mitchell" wrote:

I'm getting an evaluation error.

cell A42 contains the number 429

countif(Tasks!M6:indirect("M" & A42),"ION")
countif(Tasks!M6:indirect("M" & 429), "ION")
countif(Tasks!M^:indirect("M429"),"ION")
countif(Tasks!$M$6:$M$429,"ION")

The next evaluation will result in an error. It looks correct????


"Dave Peterson" wrote:

=countif(indirect("m6:M" & a1),"ION")
or
=countif(m6:indirect("M" & a1),"ION")

In the second one, the m6 will adjust if you copy the formula.

Mitchell wrote:

When defining a range can you use a reference instead of the actual value?

countif(m6:m429,"ION")

Can I replace the 429 with a reference to a cell containing the 429?


--

Dave Peterson

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
Parameter Query Cell substitution Jockel Excel Discussion (Misc queries) 2 December 8th 06 04:28 PM
Character Substitution in Array BillCPA Excel Discussion (Misc queries) 1 December 7th 06 01:34 PM
substitution Cossloffe Excel Discussion (Misc queries) 1 June 4th 06 07:10 AM
Substitution Boenerge Excel Discussion (Misc queries) 2 May 23rd 05 12:14 PM
why does ON = Ambiguous in substitution formula? waladd Excel Worksheet Functions 5 May 6th 05 05:29 PM


All times are GMT +1. The time now is 12:30 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"