Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Column Counting Problem 1

Status
Not open for further replies.

estone4009

Technical User
Dec 31, 2001
39
US
I have 12 columns each containing a 0,1,2,3 or 4. How can I take these 12 columns and have it total the 0's,1's,2's,3's and 4's into 5 more new columns? Again, I want it to count the number of 0's for example and place that in a new column. The numbers corespond to how long an account has been overdue. And each of the 12 columns is one of the 12 previous months. Any help or ideas would be appreciated!

Thanks!
 
Check out Coutif in Excel's help file.

Example:
[COLOR=blue white]=countif(A1:L1,0)[/color]
[COLOR=blue white]=countif(A1:L1,1)[/color]
etc.

[tt]_____
[blue]-John[/blue]
[/tt][red]"If you're flammable and have legs, you are never blocking a fire exit."[/red]
-Mitch Hedberg

Help us help you. Please read FAQ181-2886 before posting.
 
use the COUNTIF function eg if columns A:L contain your data, then in M2, you may use:

=COUNTIF($A2:$M2,0)

in N2, you may have:

=COUNTIF($A2:$M2,1)

etc etc

Rgds, Geoff

"Three things are certain: Death, taxes and lost data. Guess which has occurred"

Please read FAQ222-2244 before you ask a question
 
Doh ! - amend M to L in my formulae

Rgds, Geoff

"Three things are certain: Death, taxes and lost data. Guess which has occurred"

Please read FAQ222-2244 before you ask a question
 
Geoff,
You helped me out with a question earlier today, which unfortunately I posted a link to a site that had some form of password breaker in it, so it justifiably got deleted.
I was not therefore able to give you the star you deserved. So I've given it to you here instead. Thanks again
Marc
 
No probs Marc - thank you. Glad I could help you out.

Rgds, Geoff

"Three things are certain: Death, taxes and lost data. Guess which has occurred"

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top