Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default CountIf question


hello

i was wondering if i could use the countif function using variables
instead of having set constants

i.e. =countif(R[-2]C[1]:RC[2],""search"")

but i want = countif(R[VAR1]C:[VAR2]:RC[2],""search"")

i cant' seem to get the VAR1 part to work..maybe its my equation or
maybe i should use a different equation..

thanks for your help


--
narutard
------------------------------------------------------------------------
narutard's Profile: http://www.excelforum.com/member.php...o&userid=25111
View this thread: http://www.excelforum.com/showthread...hreadid=386432

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default CountIf question

=countif(indirect("R[" & R1C1 & "]C[" & R1C2 & "]:RC[2]"),"Search")

Assuming your sheet is in R1C1 mode. R1C1 contains the first Var and R1C2
contains the second VAR in your example.

--
Regards,
Tom Ogilvy

"narutard" wrote in
message ...

hello

i was wondering if i could use the countif function using variables
instead of having set constants

i.e. =countif(R[-2]C[1]:RC[2],""search"")

but i want = countif(R[VAR1]C:[VAR2]:RC[2],""search"")

i cant' seem to get the VAR1 part to work..maybe its my equation or
maybe i should use a different equation..

thanks for your help


--
narutard
------------------------------------------------------------------------
narutard's Profile:

http://www.excelforum.com/member.php...o&userid=25111
View this thread: http://www.excelforum.com/showthread...hreadid=386432



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default CountIf question


hi

i was wondering if it was possibel to declare the countif function w/o
using the Range function before it..

range(something).select
"=countif(R[" & unknown & "]C[-3]:RC[-3],""SEARCH"")"

in the previous post there was the word indirect.. i' m not sure what
that does but when i took it out ..my countif worked! ..so..i'm not
sure whether the "indirect" is essential for what i need to do

is it possible instead of declaring a range (because i'm using a LOOP
already w/ a specified range already) to insert a set of coodinates
instead..i.e. the countif function needs somewhere to start LOOKING
somewhere

thanks


--
narutard
------------------------------------------------------------------------
narutard's Profile: http://www.excelforum.com/member.php...o&userid=25111
View this thread: http://www.excelforum.com/showthread...hreadid=386432

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default CountIf question


hi

i was wondering if it was possibel to declare the countif function w/o
using the Range function before it..

range(something).select
"=countif(R[" & unknown & "]C[-3]:RC[-3],""SEARCH"")"

in the previous post there was the word indirect.. i' m not sure what
that does but when i took it out ..my countif worked! ..so..i'm not
sure whether the "indirect" is essential for what i need to do

is it possible instead of declaring a range (because i'm using a LOOP
already w/ a specified range already) to insert a set of coodinates
instead..i.e. the countif function needs somewhere to start LOOKING
somewhere

thanks


--
narutard
------------------------------------------------------------------------
narutard's Profile: http://www.excelforum.com/member.php...o&userid=25111
View this thread: http://www.excelforum.com/showthread...hreadid=386432

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default CountIf question


hi

i was wondering if it was possibel to declare the countif function w/o
using the Range function before it..

range(something).select
"=countif(R[" & unknown & "]C[-3]:RC[-3],""SEARCH"")"

in the previous post there was the word indirect.. i' m not sure what
that does but when i took it out ..my countif worked! ..so..i'm not
sure whether the "indirect" is essential for what i need to do

is it possible instead of declaring a range (because i'm using a LOOP
already w/ a specified range already) to insert a set of coodinates
instead..i.e. the countif function needs somewhere to start LOOKING
somewhere

thanks


--
narutard
------------------------------------------------------------------------
narutard's Profile: http://www.excelforum.com/member.php...o&userid=25111
View this thread: http://www.excelforum.com/showthread...hreadid=386432



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default CountIf question


woah.sorry for triple posting!

any help would be greatly appreciated


--
narutard
------------------------------------------------------------------------
narutard's Profile: http://www.excelforum.com/member.php...o&userid=25111
View this thread: http://www.excelforum.com/showthread...hreadid=386432

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
Countif question SandyKazmir Excel Worksheet Functions 1 November 9th 10 03:40 PM
another countif question DebC Excel Discussion (Misc queries) 2 December 31st 09 10:44 PM
countif question Cube Farmer Excel Worksheet Functions 3 February 22nd 06 04:49 PM
CountIF Question guile Excel Worksheet Functions 1 January 26th 06 02:43 AM
countif question Jennie Excel Worksheet Functions 7 June 22nd 05 06:05 PM


All times are GMT +1. The time now is 05:01 AM.

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

About Us

"It's about Microsoft Excel"