Determine last cell on sheet with value

Discuss the spreadsheet application
Post Reply
me231
Posts: 127
Joined: Sat Nov 02, 2013 4:31 pm

Determine last cell on sheet with value

Post by me231 »

find the last cell in a sheet with contents... not last cell in a column or last cell in a row -- - last cell on sheet with value

Ctrl+end is what keeps coming up - using mac keyboard i can't locate this shortcut

Fn and arrows so not work
Ctrl and Arrows don't work
Cmd and arrow up down take me to 1st and last rows - not last cell -

just curious

thanks in advance
Last edited by MrProgrammer on Thu Apr 25, 2024 6:18 pm, edited 1 time in total.
Reason: Edited topic's subject
openOffice 4.0.0 on macOS
Alex1
Volunteer
Posts: 726
Joined: Fri Feb 26, 2010 1:00 pm
Location: Netherlands

Re: Revisit an old topic - find last

Post by Alex1 »

Try Cmd+End.
AOO 4.1.15 & LO 24.2.2 on Windows 10
me231
Posts: 127
Joined: Sat Nov 02, 2013 4:31 pm

Re: Revisit an old topic - find last

Post by me231 »

but on mac keyboard where is that "end" Key - i have tried all the arrows with combinations of fn, ctrl option,cmd....with no glory = not super important just kinda frustrating
openOffice 4.0.0 on macOS
User avatar
RoryOF
Moderator
Posts: 34621
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Revisit an old topic - find last

Post by RoryOF »

Possibly Fn right arrow.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
robleyd
Moderator
Posts: 5087
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Revisit an old topic - find last

Post by robleyd »

Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
User avatar
Lupp
Volunteer
Posts: 3553
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Revisit an old topic - find last

Post by Lupp »

me231 wrote: Tue Apr 02, 2024 5:28 pm ... not last cell in a column or last cell in a row -- - last cell on sheet with value ...
There isn't such a thing generally.
To call a cell the last one regarding one or another property would require a clearly defined linear order of all the cells.
Such an order doesn't exist. Only if you can assure that the set of all the cells of the sheet having the property of interest have a rectangular "closure" where the last element of the last column (also the last element of the last row then) also has that property, the result can be unambiguous.
In addition it must be unambiguously defined what is to be accepted as a "cell with value".
The attached example contains some Basic code from my library concerning the closure of cell sets.
aoo546343LastCellContainingValue_WHAT_posted.ods
(15.38 KiB) Downloaded 41 times
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
Nick N,
Posts: 140
Joined: Wed Aug 09, 2023 2:10 pm

Re: Revisit an old topic - find last

Post by Nick N, »

me231 wrote:
> find the last cell in a sheet with contents... not last cell in a column
> or last cell in a row -- - last cell on sheet with value
>
> Ctrl+end is what keeps coming up - using mac keyboard i can't locate this
> shortcut
>
> Fn and arrows so not work
> Ctrl and Arrows don't work
> Cmd and arrow up down take me to 1st and last rows - not last cell -
>
> just curious
>
> thanks in advance

Funny behavior. My wife told me that on her mac Fn and down arrow would do.
Libre Office 6.0.7 on Ubuntu 18.04
User avatar
MrProgrammer
Moderator
Posts: 4912
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Revisit an old topic - find last

Post by MrProgrammer »

me231 wrote: Tue Apr 02, 2024 5:28 pm Ctrl+end is what keeps coming up - using mac keyboard i can't locate this shortcut
Look in Help. Help → OpenOffice Help → OpenOffice Calc → Index → shortcut keys;spreadsheets says to use Command+End, not Ctrl+End.
OpenOffice Calc help
OpenOffice Calc help
202404251022.gif (74.79 KiB) Viewed 213 times
LibreOffice help is similar; use Command+End.
LibreOffice Calc help
LibreOffice Calc help
202404251113.gif (32.93 KiB) Viewed 210 times

me231 wrote: Tue Apr 02, 2024 6:45 pm but on mac keyboard where is that "end" Key?
That is a MacOS question, not an OpenOffice question. Windows PCs usually have a key marked End. To learn about End, look in the documentation for your Mac. In Finder, I used Help → MacOS Help → Search → Windows keys → Windows keys on a Mac keyboard. The picture below is what I see on my Mac. On my Mac to perform End I hold fn and press right arrow. On my Mac to perform Command+End I hold Command and fn, then press right arrow. Your Mac may be different.
MacOS help
MacOS help
202404251033.gif (29.74 KiB) Viewed 213 times

Lupp wrote: Wed Apr 03, 2024 11:21 pm There isn't such a thing [last cell on sheet with value] generally. … Such an order doesn't exist.
Correct, just as the Complex Numbers do not form an ordered field. The difficulty here is that Calc's help for the shortcut is incorrect in both OpenOffice and LibreOffice. It says: Moves the cursor to the last cell on the sheet which contains data. Command+End actually moves the cursor to the cell at the intersection of the last (bottommost) row with data and the last (rightmost) column with data. The cell itself might be empty. Pressing ⌘End, then ⌘⇧Home, will select all of the data on the sheet.

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the Subject field. Select the green checkmark icon at the same time.

[Tutorial] Mac FAQ
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
Post Reply