"these type of cases"?
I'm not sure your situation falls into a "type" of case.
 
In YOUR case, Excel is interpreting your string "> 7 days"
as:  GREATER than " 7 days"
or:  GREATER THAN [space]7[space]"days"
 
In your samples, your cells contain "0-3 Days", "4-7 Days" or "> 7 Days".
In each case, "0", "4" and ">" are all "greater than a [space].
 
[sp] = char(32)
  0  = char(48)
  4  = char(52)
  >  = char(62)

So, it says that 100% of the records are Greater than [space].

The problem is with the first character (>).

in some cases, you may WANT to count values greater than a specific value.
=countif provides this capability.
However, in your case, you actually want to compare the exact string.

If you were to change your representations to:
0-3 Days
4-7 Days
7-# Days

then your results would be as you expect.

Paul
-----------------------------------------
“Do all the good you can,
By all the means you can,
In all the ways you can,
In all the places you can,
At all the times you can,
To all the people you can,
As long as ever you can.” - John Wesley
-----------------------------------------


>________________________________
>From: Waseem Saifi <waseemsa...@gmail.com>
>To: excel-macros <excel-macros@googlegroups.com> 
>Sent: Tuesday, July 23, 2013 6:45 AM
>Subject: Re: $$Excel-Macros$$
>
>
>
>Dear Anil,
>thanx for help, But I am already getting right output using pivot table. My 
>concern is what's problem with countif. what's the issue in countif.
>does countif not reliable in these type of cases !
>
>Thanks,
>Waseem Saifi
>
>
>
>
>On Tue, Jul 23, 2013 at 3:52 PM, Anil B <ank.bira...@gmail.com> wrote:
>
>Hi Waseem,
>>
>>Just use this formula u will get the results.
>>
>>=+GETPIVOTDATA(" Category ",$G$1," Category ","> 7 Days")
>>
>>Thanks,
>>Anil
>>
>>On Tue, Jul 23, 2013 at 2:26 PM, Waseem Saifi <waseemsa...@gmail.com> wrote:
>>
>>Dear Experts,
>>>
>>>Please look into attached file. I want to find out percentage of each 
>>>category. Using Pivot table it is correct. But using Countif it is incorrect.
>>>please help
>>>
>>>Regards,
>>>Waseem Saifi
>>>-- 
>>>Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
>>>=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
>>>https://www.facebook.com/discussexcel
>>> 
>>>FORUM RULES
>>> 
>>>1) Use concise, accurate thread titles. Poor thread titles, like Please 
>>>Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will 
>>>not get quick attention or may not be answered.
>>>2) Don't post a question in the thread of another member.
>>>3) Don't post questions regarding breaking or bypassing any security measure.
>>>4) Acknowledge the responses you receive, good or bad.
>>>5) Jobs posting is not allowed.
>>>6) Sharing copyrighted material and their links is not allowed.
>>> 
>>>NOTE : Don't ever post confidential data in a workbook. Forum owners and 
>>>members are not responsible for any loss.
>>>--- 
>>>You received this message because you are subscribed to the Google Groups 
>>>"MS EXCEL AND VBA MACROS" group.
>>>To unsubscribe from this group and stop receiving emails from it, send an 
>>>email to mailto:excel-macros%2bunsubscr...@googlegroups.com.
>>>To post to this group, send email to excel-macros@googlegroups.com.
>>>Visit this group at http://groups.google.com/group/excel-macros.
>>>For more options, visit https://groups.google.com/groups/opt_out.
>>> 
>>> 
>>>
>>-- 
>>Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
>>=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
>>https://www.facebook.com/discussexcel
>> 
>>FORUM RULES
>> 
>>1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
>>Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not 
>>get quick attention or may not be answered.
>>2) Don't post a question in the thread of another member.
>>3) Don't post questions regarding breaking or bypassing any security measure.
>>4) Acknowledge the responses you receive, good or bad.
>>5) Jobs posting is not allowed.
>>6) Sharing copyrighted material and their links is not allowed.
>> 
>>NOTE : Don't ever post confidential data in a workbook. Forum owners and 
>>members are not responsible for any loss.
>>--- 
>>You received this message because you are subscribed to the Google Groups "MS 
>>EXCEL AND VBA MACROS" group.
>>To unsubscribe from this group and stop receiving emails from it, send an 
>>email to mailto:excel-macros%2bunsubscr...@googlegroups.com.
>>To post to this group, send email to excel-macros@googlegroups.com.
>>Visit this group at http://groups.google.com/group/excel-macros.
>>For more options, visit https://groups.google.com/groups/opt_out.
>> 
>> 
>>
>-- 
>Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
>=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
>https://www.facebook.com/discussexcel
> 
>FORUM RULES
> 
>1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
>Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
>quick attention or may not be answered.
>2) Don't post a question in the thread of another member.
>3) Don't post questions regarding breaking or bypassing any security measure.
>4) Acknowledge the responses you receive, good or bad.
>5) Jobs posting is not allowed.
>6) Sharing copyrighted material and their links is not allowed.
> 
>NOTE : Don't ever post confidential data in a workbook. Forum owners and 
>members are not responsible for any loss.
>--- 
>You received this message because you are subscribed to the Google Groups "MS 
>EXCEL AND VBA MACROS" group.
>To unsubscribe from this group and stop receiving emails from it, send an 
>email to excel-macros+unsubscr...@googlegroups.com.
>To post to this group, send email to excel-macros@googlegroups.com.
>Visit this group at http://groups.google.com/group/excel-macros.
>For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
>
>
>

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to