Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 331
Default Counting number and text values

Can someone help me with this? I am trying to count and add number of
occurrences (marked by 1 or zeros) for a specific client(using bl* to find
all clients starting with bl name) I am using sum function

=SUM(IF(D17:D410="bl*",IF(A17:A410="1",1,0)))

but return value is always 0

I also tried =COUNT(IF((D17:D200="bl*")*(A17:A2000=1),A17:A2000 )) but result
is also incorrect. Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Counting number and text values

Try this:

=SUMPRODUCT(--(A17:A410=1),--(LEFT(D17:D410,2)="bl"))


--
Biff
Microsoft Excel MVP


"Greg" wrote in message
...
Can someone help me with this? I am trying to count and add number of
occurrences (marked by 1 or zeros) for a specific client(using bl* to find
all clients starting with bl name) I am using sum function

=SUM(IF(D17:D410="bl*",IF(A17:A410="1",1,0)))

but return value is always 0

I also tried =COUNT(IF((D17:D200="bl*")*(A17:A2000=1),A17:A2000 )) but
result
is also incorrect. Thanks



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 331
Default Counting number and text values

No still comming with value of 0. Here are 2 columns:
1 United
1 United
1 United
1 United
1 United
1 United
1 United
1 United
1 United
1 United
1 United
1 United
1 United
0 United
1 United
0 United
1 United
1 United
1 Delta
0 Delta
1 Delta
0 Delta
1 Delta
0 Delta
0 Delta

I would like to sum number of 1 for United

"T. Valko" wrote:

Try this:

=SUMPRODUCT(--(A17:A410=1),--(LEFT(D17:D410,2)="bl"))


--
Biff
Microsoft Excel MVP


"Greg" wrote in message
...
Can someone help me with this? I am trying to count and add number of
occurrences (marked by 1 or zeros) for a specific client(using bl* to find
all clients starting with bl name) I am using sum function

=SUM(IF(D17:D410="bl*",IF(A17:A410="1",1,0)))

but return value is always 0

I also tried =COUNT(IF((D17:D200="bl*")*(A17:A2000=1),A17:A2000 )) but
result
is also incorrect. Thanks




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Counting number and text values

=sumif(b:b,"united",a:a)
or
=sumif(b:b,"united*",a:a)
or
=sumif(b:b,x99&"*",a:a)
if you put the prefix you wanted in x99.

if those 1's are really numbers and not text.



Greg wrote:

No still comming with value of 0. Here are 2 columns:
1 United
1 United
1 United
1 United
1 United
1 United
1 United
1 United
1 United
1 United
1 United
1 United
1 United
0 United
1 United
0 United
1 United
1 United
1 Delta
0 Delta
1 Delta
0 Delta
1 Delta
0 Delta
0 Delta

I would like to sum number of 1 for United

"T. Valko" wrote:

Try this:

=SUMPRODUCT(--(A17:A410=1),--(LEFT(D17:D410,2)="bl"))


--
Biff
Microsoft Excel MVP


"Greg" wrote in message
...
Can someone help me with this? I am trying to count and add number of
occurrences (marked by 1 or zeros) for a specific client(using bl* to find
all clients starting with bl name) I am using sum function

=SUM(IF(D17:D410="bl*",IF(A17:A410="1",1,0)))

but return value is always 0

I also tried =COUNT(IF((D17:D200="bl*")*(A17:A2000=1),A17:A2000 )) but
result
is also incorrect. Thanks





--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Counting number and text values

Try this instead. It looked like you were searching for BL and not b1.

=SUMPRODUCT(--(A1:A20=1),--(TEXT(B1:B20,2)=B1))

Cell B1 containing the info you are looking for.

John

"Greg" wrote in message
...
No still comming with value of 0. Here are 2 columns:
1 United
1 United
1 United
1 United
1 United
1 United
1 United
1 United
1 United
1 United
1 United
1 United
1 United
0 United
1 United
0 United
1 United
1 United
1 Delta
0 Delta
1 Delta
0 Delta
1 Delta
0 Delta
0 Delta

I would like to sum number of 1 for United

"T. Valko" wrote:

Try this:

=SUMPRODUCT(--(A17:A410=1),--(LEFT(D17:D410,2)="bl"))


--
Biff
Microsoft Excel MVP


"Greg" wrote in message
...
Can someone help me with this? I am trying to count and add number
of
occurrences (marked by 1 or zeros) for a specific client(using bl* to
find
all clients starting with bl name) I am using sum function

=SUM(IF(D17:D410="bl*",IF(A17:A410="1",1,0)))

but return value is always 0

I also tried =COUNT(IF((D17:D200="bl*")*(A17:A2000=1),A17:A2000 )) but
result
is also incorrect. Thanks








  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Counting number and text values

=SUMPRODUCT(--(A17:A410=1),--(D17:D410)="United"))

If that is giving zero, then you ought to check what is actually in your
columns.

If you think A17 has a 1, try =A17=1
If this gives FALSE, rather than TRUE, then look at what is in the formula
bar when A17 is selected.
Might it be text? Check =ISNUMBER(A17) or =ISTEXT(A17)

If you think D17 has "United", try =D17="United"
If that is FALSE, look in the formula bar when D17 is selected and see
whether there are spurious spaces or other non-printing characters before or
after the word "United". Does =LEN(D17) come out as 6?
--
David Biddulph

"Greg" wrote in message
...
No still comming with value of 0. Here are 2 columns:
1 United
1 United
1 United
1 United
1 United
1 United
1 United
1 United
1 United
1 United
1 United
1 United
1 United
0 United
1 United
0 United
1 United
1 United
1 Delta
0 Delta
1 Delta
0 Delta
1 Delta
0 Delta
0 Delta

I would like to sum number of 1 for United

"T. Valko" wrote:

Try this:

=SUMPRODUCT(--(A17:A410=1),--(LEFT(D17:D410,2)="bl"))


--
Biff
Microsoft Excel MVP


"Greg" wrote in message
...
Can someone help me with this? I am trying to count and add number
of
occurrences (marked by 1 or zeros) for a specific client(using bl* to
find
all clients starting with bl name) I am using sum function

=SUM(IF(D17:D410="bl*",IF(A17:A410="1",1,0)))

but return value is always 0

I also tried =COUNT(IF((D17:D200="bl*")*(A17:A2000=1),A17:A2000 )) but
result
is also incorrect. Thanks






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
Counting number of times certain Text Values appear Chart_Maker_Wonderer Excel Discussion (Misc queries) 4 March 5th 07 07:13 PM
Counting Text as a Number Jan from ROF Excel Worksheet Functions 4 January 31st 07 08:52 PM
Counting a mixed text/number column based on text in another colum Sierra Vista Steve Excel Discussion (Misc queries) 3 December 17th 06 05:30 PM
counting unique items(values or text) guneet_ahuja Excel Worksheet Functions 11 August 22nd 06 07:52 AM
Counting the number of values in a list between two specified valu andyuae Excel Worksheet Functions 2 November 25th 05 03:32 PM


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