Solved

Excel 2010 Countif problem

Posted on 2014-12-19
9
132 Views
Last Modified: 2014-12-24
I can’t get my spreadsheet to count up the number of Z jobs.  I tried several different variations of the formula, but if there is more than 1 job in a cell, it only counts it once.  I can’t figure out how to get Excel to count all the Z jobs.
ZZZ-Job.xlsx
0
Comment
Question by:WalterAPO
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 40509352
As long as the Z can't appear anywhere else in the cell contents, you can use:
=SUM((INDEX(LEN(A2:A111)-LEN(SUBSTITUTE(A2:A111,"Z","")),)))
0
 
LVL 1

Expert Comment

by:neel_7575
ID: 40509440
Do a Find - Replace All - Look for "Z", Replace with "A" or something - Excel does the Replace and gives the no. of instances replaced. Then just do an Undo, to get back the original cells
0
 

Author Comment

by:WalterAPO
ID: 40509450
The above formula is a little complicated.  I need a formual, (replace all won't work), that I can show my coworkers.  If it's too complicated they wont' use it.  Can I add a - or / between the Z job numbers to get them to count?  For this formual simple is better.   Thank you.  

Walter
0
 
LVL 1

Expert Comment

by:neel_7575
ID: 40509465
Your existing formula can still work - Just do a Text to Columns - to have the Z Jobs in individual cells - Delimiter being Comma
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 85

Expert Comment

by:Rory Archibald
ID: 40509476
If you want a simple formula you need a simple data layout.
0
 
LVL 31

Expert Comment

by:Rob Henson
ID: 40509496
In your sample, all jobs within each cell start with Z. Will this always be the case?

If so, this simple formula in column C will tell you how many jobs are in the cell in column A:

=IF(A6="",0,(LEN(A6)-LEN(SUBSTITUTE(A6,",","")))+1)

You can then just SUM column C to find out how many jobs in total.

The formula is looking at the total length of the characters in the cell and then working out the length without the commas; one less the other plus 1 tells you how many entries (plus 1 because last entry doesn't have a comma after it).

Thanks
Rob H
0
 
LVL 31

Expert Comment

by:Rob Henson
ID: 40509503
Not quite as simple, and certainly not as easily explained to other users, you can use the following Array Formula in C3 with no need for other entries in column C:

=SUM(IF(A6:A82="",0,(LEN(A6:A82)-LEN(SUBSTITUTE(A6:A82,",","")))+1))

Confirm entry with Shift + Ctrl + Enter and curly brackets  {  } will appear enclosing the formula.

Thanks
Rob H
0
 
LVL 31

Expert Comment

by:Rob Henson
ID: 40510922
Probably simpler to use Z in the substitute function, like Rory did, then don't need the +1 at the end.
0
 

Author Closing Comment

by:WalterAPO
ID: 40517057
Thank you your solution worked great.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now