Finding next empty/non-empty cell in Numbers?

This is a follow-on to how do I move/find the next non empty cell in a column in numbers on a macbook pro is there a short cut because I have the same question and wasn't able to find a reasonable answer. The closest one seemed to be an apple-script solution, but I couldn't figure out how to use that (perhaps because I'm using Numbers v. 5, [on High Sierra, on a MacBook Air] or perhaps because I'm not that versed in using apple-scripts)


My usage scenario is as follows:

I extract a bunch of data from a brokerage statement, and get it nicely formatted in Numbers.

I want to sort the data by the "Amount" column, however, since multiple consecutive transactions for a given security only have the security entered on the first transaction, if I sort the data I'll have a bunch of lines that don't have any security associated with them and the context (from being consecutive) will have been lost due to the sorting.

The simple fix is (before sorting) to find each blank cell in the "Security" column and copy the contents of the cell above into the empty cell - and then repeat the process until there are no empty cells within that column.

The problem is that there doesn't appear to be any [easy?] way to jump down to the next (or previous) empty cell within the column (as there is in Excel):

  • Down-arrowmoves down one row at a time
      • Over the course of time this will allow you to find the empty cells, but when you're talking about a table with hundreds (if not more) of rows this is excruciatingly slow
  • Shift-Down-arrowselects the cell you started on and the next row, same behavior for:
    • Shift-Control-Down-arrow (selects all cells in column to bottom of sheet)
    • Shift-z-Down-arrow (selects all cells in column to bottom of sheet)
    • Shift-Control-z-Down-arrow (selects all cells in column to bottom of sheet)
  • Control-Down-arrowjumps to the bottom of the sheet, skipping all blank cells, same behavior for:
    • z-Down-arrow
    • Control-z-Down-arrow
  • Option-Down-arrowinserts a new row below the current row, same behavor for:
    • Shift-Option-Down-arrow (selects original cell and cell in column in inserted row)
    • Shift-Control-Option-Down-arrow (selects original cell and cell in column in inserted row)
    • Shift-Control-Option-z-Down-arrow (selects original cell and cell in column in inserted row)
    • Shift-Option-z-Down-arrow (selects original cell and cell in column in inserted row)
    • Control-Option-Down-arrow (selects original cell and cell in column in inserted row)
    • Control-Option-z-Down-arrow (selects original cell and cell in column in inserted row)
    • Option-z-Down-arrow (selects original cell and cell in column in inserted row)
  • I think that covers all the possible [logical] key-combinations.

    Given the amount of redundancy, if the ability to do what I want exists - it could easily be mapped to one of the various key-combinations.

    So the questions remains:

    1. Is this ability possible in Numbers?
    2. If so, how?
    3. If not, why (and can it be implemented in a future version)?

    Numbers-OTHER, macOS High Sierra (10.13.3)

    Posted on Apr 3, 2018 2:16 PM

    Reply
    Question marked as Top-ranking reply

    Posted on Apr 3, 2018 3:43 PM

    Details are a little scarce about how your data looks.🙂 But assume it is vaguely like this:


    User uploaded file


    And you need to "fill in the blanks" in the Security column.


    One quick way to do do that would be to add a temporary column to the right (or left) with a formula like this:

    User uploaded file


    =IF(A2="",B1,A2)


    When you drag the yellow dot to fill the formula down the column, you get this:


    User uploaded file


    With the cells still selected, type command-c followed by Edit > Paste Formula Results. This removes the formulas from the temporary column. You can then delete the original column and sort on the 'Quantity' or 'Amount' column without losing the security context.


    SG

    Similar questions

    2 replies
    Question marked as Top-ranking reply

    Apr 3, 2018 3:43 PM in response to astoller

    Details are a little scarce about how your data looks.🙂 But assume it is vaguely like this:


    User uploaded file


    And you need to "fill in the blanks" in the Security column.


    One quick way to do do that would be to add a temporary column to the right (or left) with a formula like this:

    User uploaded file


    =IF(A2="",B1,A2)


    When you drag the yellow dot to fill the formula down the column, you get this:


    User uploaded file


    With the cells still selected, type command-c followed by Edit > Paste Formula Results. This removes the formulas from the temporary column. You can then delete the original column and sort on the 'Quantity' or 'Amount' column without losing the security context.


    SG

    Apr 3, 2018 5:34 PM in response to astoller

    I like the idea (though I still prefer to be able to use keyboard-shortcuts) - however, I think you made a typo in the formula.


    I believe it should be:


    IF(A2="",A1,A2)


    Thus, using the keyboard as much as possible (my preference), it becomes:

    • Get to first cell of interest:
      • Control-Up_arrow (row-1)
      • Down_arrow (skip header row, row-2 [repeat as needed if more than one header row])
      • Control-Left_arrow (A2)
    • Create temporary column, and insert formula:
      • Option-Right_arrow (create B-column, leaves B2 selected)
      • =IF(A2="",A1,A2) [Return]
    • Populate B-column with formula:
      • Up_arrow, Right_arrow (get back to B2)
      • Command-C (copy)
      • Shift-Command-Down_arrow (select B2...Bn)
      • Command-V (paste, leaving all cells selected)
    • Transfer results to A-column:
      • Command-C (copy B-column data)
      • Shift-Command-V (Paste Formula Results)

    [Alternatively, most likely having just entered the formula]

    • Shift-Command-Down_arrow (select contents of B-column)
    • Left_arrow (A2)
    • Shift-Command-V (Paste Formula Results)

    Then use the mouse and menus to delete the temporary B-column and do all the other stuff (sorting rows, etc.)


    Thanks much!

    This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

    Finding next empty/non-empty cell in Numbers?

    Welcome to Apple Support Community
    A forum where Apple customers help each other with their products. Get started with your Apple Account.