ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Countif ??? (https://www.excelbanter.com/excel-worksheet-functions/5855-countif.html)

terryv

Countif ???
 
Hello
Im not sure what the problem is that Im having, I thought I was doing the
function right.

I have a worksheet where I need to look a time value up from another sheet
(also time values), and Im using the Countif function.

EX:
Sheet1
Col C
Values from 7:00 am to 6:30 am (could be many instances of each time
inbetween (inclusive).

Sheet2
Col A
Values 7:00 am to 6:30 am (only one instance of each time inclusively).
Formatted as Time 13:30

Sheet2
Col B
Should be a count of all values from Sheet 1 that match the value on Sheet 2
Col A. (formatted as Time 13:30)

When I do the Countif, I get a value of 0 (formatted to number with 0
decimals).

I have
=Countif(Times,"=A3")
But it returns 0. Times is a range name representing Sheet1 C1:C821 (I
double checked to make sure the range name was pointing to the proper
range).

Any suggestions?
Thank you

Terry V



Biff

Hi!

Just remove the quotes and the equal sign. "=A3"

=Countif(Times,A3)

When you put quotes around something Excel treats it as
text. In this case Excel was looking for the literal text
string of =A3.

Biff

-----Original Message-----
Hello
Im not sure what the problem is that Im having, I thought

I was doing the
function right.

I have a worksheet where I need to look a time value up

from another sheet
(also time values), and Im using the Countif function.

EX:
Sheet1
Col C
Values from 7:00 am to 6:30 am (could be many instances

of each time
inbetween (inclusive).

Sheet2
Col A
Values 7:00 am to 6:30 am (only one instance of each time

inclusively).
Formatted as Time 13:30

Sheet2
Col B
Should be a count of all values from Sheet 1 that match

the value on Sheet 2
Col A. (formatted as Time 13:30)

When I do the Countif, I get a value of 0 (formatted to

number with 0
decimals).

I have
=Countif(Times,"=A3")
But it returns 0. Times is a range name representing

Sheet1 C1:C821 (I
double checked to make sure the range name was pointing

to the proper
range).

Any suggestions?
Thank you

Terry V


.


terryv

Thank you so much Biff
I was using the Sumif syntax ... kinda...

Again
Thank you

Terry

"Biff" wrote in message
...
Hi!

Just remove the quotes and the equal sign. "=A3"

=Countif(Times,A3)

When you put quotes around something Excel treats it as
text. In this case Excel was looking for the literal text
string of =A3.

Biff

-----Original Message-----
Hello
Im not sure what the problem is that Im having, I thought

I was doing the
function right.

I have a worksheet where I need to look a time value up

from another sheet
(also time values), and Im using the Countif function.

EX:
Sheet1
Col C
Values from 7:00 am to 6:30 am (could be many instances

of each time
inbetween (inclusive).

Sheet2
Col A
Values 7:00 am to 6:30 am (only one instance of each time

inclusively).
Formatted as Time 13:30

Sheet2
Col B
Should be a count of all values from Sheet 1 that match

the value on Sheet 2
Col A. (formatted as Time 13:30)

When I do the Countif, I get a value of 0 (formatted to

number with 0
decimals).

I have
=Countif(Times,"=A3")
But it returns 0. Times is a range name representing

Sheet1 C1:C821 (I
double checked to make sure the range name was pointing

to the proper
range).

Any suggestions?
Thank you

Terry V


.





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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com