Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default countif with cell ref vs fixed number...

I am trying to use countif to establish whether a range of cells have a value
greater than or equal to a number in another cell - the number is 21.8% and
lives in cell C4

this formula works fine =COUNTIF(C16:R16,"=21.8%")

however if I try and make this work using the cell ref I get a result of
zero, eg

=COUNTIF(C16:R16,"=C4")

Please can someone tell me what I am doing wrong, or is this a limitation of
excel?

Many thanks in advance for your help,

griff
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default countif with cell ref vs fixed number...

Griff

Your formula is fine so it must be your data. Double check that the range
contains properly formatted percentages i.e.

clear a cell in the range format it as percentage and enter 22:00 in it
don't type the percentage symbol.

Mike

"griff" wrote:

I am trying to use countif to establish whether a range of cells have a value
greater than or equal to a number in another cell - the number is 21.8% and
lives in cell C4

this formula works fine =COUNTIF(C16:R16,"=21.8%")

however if I try and make this work using the cell ref I get a result of
zero, eg

=COUNTIF(C16:R16,"=C4")

Please can someone tell me what I am doing wrong, or is this a limitation of
excel?

Many thanks in advance for your help,

griff

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default countif with cell ref vs fixed number...

thanks Mike, but fyi I tried this already. since this was someone else's
sheet I did wonder if maybe there was a mixture of formats confusing excel.
to test the formula I created a new sheet with just basic numbers, no formats
and got exactly the same issue....

but thanks anyway for looking anyone else have any ideas?

cheers

griff

"Mike H" wrote:

Griff

Your formula is fine so it must be your data. Double check that the range
contains properly formatted percentages i.e.

clear a cell in the range format it as percentage and enter 22:00 in it
don't type the percentage symbol.

Mike

"griff" wrote:

I am trying to use countif to establish whether a range of cells have a value
greater than or equal to a number in another cell - the number is 21.8% and
lives in cell C4

this formula works fine =COUNTIF(C16:R16,"=21.8%")

however if I try and make this work using the cell ref I get a result of
zero, eg

=COUNTIF(C16:R16,"=C4")

Please can someone tell me what I am doing wrong, or is this a limitation of
excel?

Many thanks in advance for your help,

griff

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default countif with cell ref vs fixed number...

Hi Griff

Because you have C4 within the quotes, Countif is looking for "C4" not the
contents of C4
Try
=COUNTIF(C16:R16,"="&C4)

--
Regards
Roger Govier

"griff" wrote in message
...
I am trying to use countif to establish whether a range of cells have a
value
greater than or equal to a number in another cell - the number is 21.8%
and
lives in cell C4

this formula works fine =COUNTIF(C16:R16,"=21.8%")

however if I try and make this work using the cell ref I get a result of
zero, eg

=COUNTIF(C16:R16,"=C4")

Please can someone tell me what I am doing wrong, or is this a limitation
of
excel?

Many thanks in advance for your help,

griff


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default countif with cell ref vs fixed number...

Bingo!

Roger you are the man - thanks for your help!

cheers

griff

"Roger Govier" wrote:

Hi Griff

Because you have C4 within the quotes, Countif is looking for "C4" not the
contents of C4
Try
=COUNTIF(C16:R16,"="&C4)

--
Regards
Roger Govier

"griff" wrote in message
...
I am trying to use countif to establish whether a range of cells have a
value
greater than or equal to a number in another cell - the number is 21.8%
and
lives in cell C4

this formula works fine =COUNTIF(C16:R16,"=21.8%")

however if I try and make this work using the cell ref I get a result of
zero, eg

=COUNTIF(C16:R16,"=C4")

Please can someone tell me what I am doing wrong, or is this a limitation
of
excel?

Many thanks in advance for your help,

griff





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default countif with cell ref vs fixed number...

That'll teach me to read a post more thoroughlyy, I tested
=COUNTIF(C16:R16,"=21.8%")
which of course works fine

Mike


"Roger Govier" wrote:

Hi Griff

Because you have C4 within the quotes, Countif is looking for "C4" not the
contents of C4
Try
=COUNTIF(C16:R16,"="&C4)

--
Regards
Roger Govier

"griff" wrote in message
...
I am trying to use countif to establish whether a range of cells have a
value
greater than or equal to a number in another cell - the number is 21.8%
and
lives in cell C4

this formula works fine =COUNTIF(C16:R16,"=21.8%")

however if I try and make this work using the cell ref I get a result of
zero, eg

=COUNTIF(C16:R16,"=C4")

Please can someone tell me what I am doing wrong, or is this a limitation
of
excel?

Many thanks in advance for your help,

griff



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 cell contians a specific number (within a list) porter444 Excel Worksheet Functions 16 September 25th 07 07:56 PM
Dividing by fixed number Colin Macleod Excel Discussion (Misc queries) 4 February 12th 07 04:00 PM
Addding a Random number to a fixed number..... Dermot Excel Discussion (Misc queries) 6 August 20th 06 12:17 PM
How can i specify a cell to have a fixed number of characters john dunford Excel Discussion (Misc queries) 1 January 30th 06 10:08 PM
Rounding a number to a multiple quantity that adds to a fixed total number wjlo Excel Worksheet Functions 1 November 9th 04 04:43 PM


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