Count number of empty cells in a range

AstroZack shared this question 4 days ago
Answered

Hey Everyone,


I am trying to set Geogebra up so that it graphs everything in a predefined range of cells - even when something is added afterwards.


Example: Students enter x and y values in columns A and B. They enter data down through row 5. The data it automatically graphed - no action required by student because everything is set up ahead of time. Students then come back and enter another data point in row 8 and it needs to be graphed automatically as well - no additional action by the student.


Is that possible? Seems like it should be, but I can't seem to figure it out.


As a follow-up, is there any way to simply count the number of data points in a range when empty cells are part of the range?

Comments (4)

photo
1

Yes, if you define l1=A1:A100 and l2=B1:B100 then it works quite nicely


https://www.geogebra.org/m/tt8nxabm


Length(l1) will give how many points

photo
1

Thank you, Michael! That worked beautifully to solve my graphing issues and helped me streamline a lot of other things as well. For some reason the Length command is not working. Not matter what list I choose, it only ever returns a length of 1 (see screenshot):


a1cbd5f3f01ee9350783323b8c545c65


I am trying to count the number of points like this: Length(IoPoints). There are currently 15 points in that list, though. Even trying to count a simple list of elements isn"t working: Length(ListDate) yields 1. Is because of how I named the list or am I doing something else wrong?


Zack

P.S. Also still scratching my head on RSquare... For some reason Geogebra does not seem to be recognizing my lists? RSquare(IoPoints, g) returns undefined.

photo
1

try Length(Flatten(IoPoints))

it says 16

photo
1

Thanks, mathmagic! I never would have figured that out on my own. I'll look into the Flatten command more deeply so I can know any ins and outs.

Zack

photo
© 2020 International GeoGebra Institute