Enter the same data into multiple, non-adjacent cells in OpenOffice.Org Calc

6,465

Solution 1

AFAIK, you can't do this for non-adjacent cells in OpenOffice or LibreOffice Calc (this is different from Excel - there, you can use CTRL+Enter on non-contiguous ranges). For adjacent cells, use ALT+ENTER to enter data or formula into all selected cells. Works both in OpenOffice Calc and LibreOffice Calc.

From the LibreOffice Calc Help (https://help.libreoffice.org/Calc/Shortcut_Keys_for_Spreadsheets):

To fill a selected cell range with the formula that you entered on the Input line, press Alt+Enter.

Solution 2

There does not seem to be any way to select multiple nonadjacent cells and then type in a value to fill all cells. Using Alt+Enter gives the following message.

Insert into multiple selection not possible.

Instead, in LibreOffice, first enter the value into a single cell, then copy (Ctrl+c or the menu). After that, select multiple nonadjacent cells and paste (Ctrl+v or the menu).

Paste multiple does not work in Apache OpenOffice. However a macro could be written and assigned to a hotkey. Here is some code to get started.

Sub DisplaySelectedRanges
    oSels = ThisComponent.CurrentSelection
    For selIndex = 0 to oSels.getCount() - 1
        oSel = oSels.getByIndex(selIndex)
        Print(oSel.AbsoluteName)
    Next selIndex
End Sub
Share:
6,465

Related videos on Youtube

Federico Caliò
Author by

Federico Caliò

Updated on September 18, 2022

Comments

  • Federico Caliò
    Federico Caliò over 1 year

    I want to enter the same data into multiple cells that are not adjacent. I have selected the cells and pressed CTRL + ENTER but this doesn't work.

    • RogUE
      RogUE almost 7 years
      Copy the data to the clip board, select the cells and press 'Ctrl+V'.
    • Jim K
      Jim K almost 7 years
      OpenOffice.org is outdated. Are you asking about Apache OpenOffice or LibreOffice?