[Solved] How to find the last occupied cell in a column

Discuss the spreadsheet application
Post Reply
Zammy
Posts: 2
Joined: Mon Jan 06, 2014 10:07 pm
Location: Florida

[Solved] How to find the last occupied cell in a column

Post by Zammy »

SB.2013-14.sample.ods
(100.69 KiB) Downloaded 136 times
First post and pretty much a newbie to calc so let me tell my tale. I've been using this spreadsheet to keep track of our small bowling group for a couple of years now without any problems at all. We like to move folks around so they are not always bowling on the same lanes or with the same people week after week.

I've searched these forums and googled for a solution but have come up empty with everything I've tried so far. What I would like to do seems simple but with my limited knowledge I'm having a hard time. Not sure if it's an array or regular formula. I'd like to have the last occupied cell in column C3-C42 show up in K26 which I will be able to reference on our summary sheet instead of going back through each sheet to see who bowled where. I'm sure having some blank cells in that column is what is giving me fits. We have around 24 bowlers but not everyone makes it to the lanes on a weekly basis as you can see by the individual sheets.

Also, is it possible to reference the next to last pair the individual bowled on even if there are blank weeks, I realize that this would be a different formula. and I would put that info in K27. Any help is appreciated and thanks in advance
Last edited by Zammy on Wed Jan 15, 2014 2:35 am, edited 1 time in total.
OpenOffice 4.0.1 on Windows 7 Pro
ken johnson
Volunteer
Posts: 918
Joined: Sun May 31, 2009 1:35 am
Location: Sydney, Australia

Re: How to find the last occupied cell in a specific column

Post by ken johnson »

Try

Code: Select all

=LOOKUP("ZZZ";C3:C42)
in K26 and

Code: Select all

=LOOKUP("ZZZ";C3:INDEX(C1:C42;SUMPRODUCT(MAX((C3:C42<>"")*ROW(C3:C42)))-1))
in K27.
Ken Johnson
Attachments
Ultimate and penultimate lane pairs.ods
(99.13 KiB) Downloaded 113 times
AOO 4.1.3 on Ms Windows 10
Help improve this forum by clicking the EDIT button on your first post then adding "[Solved]" to its heading once a solution to your problem has been provided.
Alex1
Volunteer
Posts: 828
Joined: Fri Feb 26, 2010 1:00 pm
Location: Netherlands

Re: How to find the last occupied cell in a specific column

Post by Alex1 »

It's easier if you omit the rows with dates when people didn't play. Then the formulas will be
=OFFSET(C1;COUNTA(C3:C44);0)
=OFFSET(C2;COUNTA(C3:C44);0)
It looks like the formulas in H48:J48 and H50 are wrong, and the formulas don't include weeks 37 to 42.
And there are a lot of formulas like =IF(some expression=0;"";some expression)
but you can also suppress the zeros for selected cells by setting the number of leading zeros to zero in the cell format.
AOO 4.1.15 & LO 24.8.4 on Windows 10
Zammy
Posts: 2
Joined: Mon Jan 06, 2014 10:07 pm
Location: Florida

Re: How to find the last occupied cell in a specific column

Post by Zammy »

Ken, thank you very much, works perfectly for my needs. Also want to thank Alex1 for his info, I'm going to fix some things on the spreadsheet tomorrow when I have some time. I truly appreciate the help.
OpenOffice 4.0.1 on Windows 7 Pro
Post Reply