Hi,
I have to count how many rows are filled with data in 3 columns. All the columns can be filled, or just one.. I was thinking on something like countif(OR(column 1, column 2, column 3, "*").
Unfortunately it doesn't appear to be possible to add such thing. Any way around it? SUMPRODUCT?
Vasco
Last edited by vascobmcastro; 09-07-2010 at 02:32 PM.
Try:
=COUNTIFS(A1:A5,"<>",B1:B5,"<>",C1:C5,"<>")
adjusting ranges to suit..
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Unfortunately this will only count rows where all the 3 columns have been filled. Maybe my explanation wasn't so good before. What I would like to have is an expression that will count rows that contain at least one cell that is filled in those 3 columns.
Try
=SUMPRODUCT((LEN(A1:A100&B1:B100&C1:C100)>0)+0)
Audere est facere
Exactly!!!!!
Thanks!
2 more things:
- Why the +0 inside sumproduct?
- How do I adapt this formula so only rows that on the 4th column have the country "Austria" would be counted?
vasco
I guess I did misinterpret... I thought you said all 3 columns must be filled..
Try:
=SUMPRODUCT((LEN(A1:A100&B1:B100&C1:C100)>0)+0,(D1:D100="Austria")+0)
the +0 coerces the array of resulting TRUEs and FALSEs to 1's and 0's respectively, so Sumproduct can do its math.
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Thanks!![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks