I have a spreadsheet that records whether or not an event may have occurred by date. The entry may be either a number or text. I want to sum the number of times an event has occurred for a particular period.
The following works:- =(C6<>"")+(D6<>"")+(E6<>"") etc. etc. There are a lot more rows and this is cumbersome and inelegant.
Is there a smarter way to sum over a range?
[Solved] Count non-empty cells in a row
[Solved] Count non-empty cells in a row
Last edited by RoryOF on Sun Oct 20, 2019 4:29 pm, edited 2 times in total.
AOO 4.1.14
on various machines running PCLinuxOS (KDE desktop). It all began with StarOffice 5.2 - I've still got the disk!
on various machines running PCLinuxOS (KDE desktop). It all began with StarOffice 5.2 - I've still got the disk!
Re: Counting non-empty cells in a row.
Use the function COUNT() for counting numeric contents, or the COUNTA() for any contents referenced to the desired cell range.
Code: Select all
=COUNT(C6:E6)
Last edited by Zizi64 on Sun Oct 20, 2019 4:20 pm, edited 1 time in total.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Counting non-empty cells in a row. SOLVED
Thank. I just found those commands myself - should have looked first!
AOO 4.1.14
on various machines running PCLinuxOS (KDE desktop). It all began with StarOffice 5.2 - I've still got the disk!
on various machines running PCLinuxOS (KDE desktop). It all began with StarOffice 5.2 - I've still got the disk!