ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   countif (https://www.excelbanter.com/excel-discussion-misc-queries/206216-countif.html)

gemsey

countif
 
Hi,

I'm having problems with finding the right formula. I've been using a
countif to find the count of invoices which start with a 4. I've not been
having much luck so any help would be greatly appreicated.

Below is my sample data and formula I've been using:

=COUNTIF(C1:C3,"4*")

Row C
5017846
6007051
4000124


Max

countif
 
One way: =SUMPRODUCT(--(LEFT(C1:C3)="4"))
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:19,000 Files:362 Subscribers:61
xdemechanik
---
"gemsey" wrote:
I'm having problems with finding the right formula. I've been using a
countif to find the count of invoices which start with a 4. I've not been
having much luck so any help would be greatly appreicated.

Below is my sample data and formula I've been using:

=COUNTIF(C1:C3,"4*")

Row C
5017846
6007051
4000124


gemsey

countif
 
Thanks for the answer. Another question. I'm going to be needing a sumif
type formula also. For example for all invoices starting with 4 give me the
sum of the bills.

row C row d
5017730 10202.74
5017737 12879.33
5017744 25526.04
5017846 3261.97
6007051 12521.43
4000124 1011.68



"Max" wrote:

One way: =SUMPRODUCT(--(LEFT(C1:C3)="4"))
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:19,000 Files:362 Subscribers:61
xdemechanik
---
"gemsey" wrote:
I'm having problems with finding the right formula. I've been using a
countif to find the count of invoices which start with a 4. I've not been
having much luck so any help would be greatly appreicated.

Below is my sample data and formula I've been using:

=COUNTIF(C1:C3,"4*")

Row C
5017846
6007051
4000124


Mike H

countif
 
Try

=SUMPRODUCT(--(LEFT(C1:C6)="4")*D1:D6)

Mike

"gemsey" wrote:

Thanks for the answer. Another question. I'm going to be needing a sumif
type formula also. For example for all invoices starting with 4 give me the
sum of the bills.

row C row d
5017730 10202.74
5017737 12879.33
5017744 25526.04
5017846 3261.97
6007051 12521.43
4000124 1011.68



"Max" wrote:

One way: =SUMPRODUCT(--(LEFT(C1:C3)="4"))
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:19,000 Files:362 Subscribers:61
xdemechanik
---
"gemsey" wrote:
I'm having problems with finding the right formula. I've been using a
countif to find the count of invoices which start with a 4. I've not been
having much luck so any help would be greatly appreicated.

Below is my sample data and formula I've been using:

=COUNTIF(C1:C3,"4*")

Row C
5017846
6007051
4000124


Max

countif
 
Try: =SUMPRODUCT(--(LEFT(C1:C3)="4"),D1:D3)
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:19,000 Files:362 Subscribers:61
xdemechanik
---
"gemsey" wrote:
Thanks for the answer. Another question. I'm going to be needing a sumif
type formula also. For example for all invoices starting with 4 give me the
sum of the bills.

row C row d
5017730 10202.74
5017737 12879.33
5017744 25526.04
5017846 3261.97
6007051 12521.43
4000124 1011.68



gemsey

countif
 
Thanks so much for your help. I can move on now without pulling my hair out.

"Max" wrote:

Try: =SUMPRODUCT(--(LEFT(C1:C3)="4"),D1:D3)
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:19,000 Files:362 Subscribers:61
xdemechanik
---
"gemsey" wrote:
Thanks for the answer. Another question. I'm going to be needing a sumif
type formula also. For example for all invoices starting with 4 give me the
sum of the bills.

row C row d
5017730 10202.74
5017737 12879.33
5017744 25526.04
5017846 3261.97
6007051 12521.43
4000124 1011.68



Max

countif
 
Welcome. Glad it helped.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:19,000 Files:362 Subscribers:62
xdemechanik
---
"gemsey" wrote in message
...
Thanks so much for your help. I can move on now without pulling my hair
out.





All times are GMT +1. The time now is 04:52 PM.

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