Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
chris2bc
 
Posts: n/a
Default Variable Criteria?


I am trying to do a formula where the criteria changes from row to row.
For example, in the following formula I would like to use a cell's
value instead of "4" or "1":

=COUNTIF(A:A,"<=4")-COUNTIF(A:A,"<=1")

Is there a way to do this? If not, I will give a much larger
explanation of what I am trying to do.

I appreciate the help.

Chris


--
chris2bc
------------------------------------------------------------------------
chris2bc's Profile: http://www.excelforum.com/member.php...o&userid=29133
View this thread: http://www.excelforum.com/showthread...hreadid=488535

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bpeltzer
 
Posts: n/a
Default Variable Criteria?

Use the & operator to combine the operator you want (<=) with the cell
reference containing the value: =COUNTIF(A:A,"<="& F2)
--Bruce

"chris2bc" wrote:


I am trying to do a formula where the criteria changes from row to row.
For example, in the following formula I would like to use a cell's
value instead of "4" or "1":

=COUNTIF(A:A,"<=4")-COUNTIF(A:A,"<=1")

Is there a way to do this? If not, I will give a much larger
explanation of what I am trying to do.

I appreciate the help.

Chris


--
chris2bc
------------------------------------------------------------------------
chris2bc's Profile: http://www.excelforum.com/member.php...o&userid=29133
View this thread: http://www.excelforum.com/showthread...hreadid=488535


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
chris2bc
 
Posts: n/a
Default Variable Criteria?


Ah! Thank you Bruce! Worked like a charm!

--Chris


--
chris2bc
------------------------------------------------------------------------
chris2bc's Profile: http://www.excelforum.com/member.php...o&userid=29133
View this thread: http://www.excelforum.com/showthread...hreadid=488535

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
Returning Results Based on Two Criteria [email protected] Excel Worksheet Functions 7 October 23rd 05 02:53 PM
How do I identify Filter criteria or variable graph title? Excel_loser Excel Discussion (Misc queries) 0 October 4th 05 07:07 PM
I am trying to use get pivot data with variable criteria JenS Excel Worksheet Functions 1 June 27th 05 01:54 PM
sorting more than 3 keys Brooke Excel Discussion (Misc queries) 3 June 18th 05 04:52 AM
countif variable criteria neda5 Excel Discussion (Misc queries) 3 May 3rd 05 10:55 AM


All times are GMT +1. The time now is 09:11 PM.

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"