Forum Discussion
gaiachris
Jan 10, 2023Copper Contributor
calcul
hi first sorry for my english !I need help.
under the box A I would like a total. but not a somme because I've got it in the box CA;
In this Box A I would like to have to know how much room's are occuped. So if there is a number (which is the price for the room) I need the equivalent of 1 if there is no number I need 0 withc mine that in the total box there is the somme of all the number 1 !
hope it's clear !!!!!!!! thanks for your help ! Chris
Hi gaiachris
if I understand you correctly, you want to count how many numbers are in that column.
For this, you can use the COUNT function. For example:
=COUNT(H2:H65)
will count only numbers in that range. If there is a text, it is not counted. If you also need to include texts, you can use COUNTA
=COUNTA(H2:H65)
I hope this helps.
- Martin_WeissBronze Contributor
Hi gaiachris
if I understand you correctly, you want to count how many numbers are in that column.
For this, you can use the COUNT function. For example:
=COUNT(H2:H65)
will count only numbers in that range. If there is a text, it is not counted. If you also need to include texts, you can use COUNTA
=COUNTA(H2:H65)
I hope this helps.
- gaiachrisCopper Contributor
Martin_Weiss thanks for answer, but I've already done the count what I want is to have the number of rooms occupied without the price. So if there is a number and a name on the block it's made 1 room occupied if not 0 of course. Which meant in the A block a maximum total of 30 or less.!
I'm sorry for my English !!!
- Martin_WeissBronze Contributor
Hi gaiachris
ok, you need both: name and price.
When I look at your screenshot, this will be a problem, because you have merged cells, where a name spans across multiple columns. This is something you cannot count. You would need the name in every column in individual cells, not merged ones.
If that's the case, then you could do just a COUNTA and divide the result by 2. For example:
=COUNTA(H2:H65)/2