[Solved] Drag cell without source reverting to default style

Discuss the spreadsheet application
Post Reply
robglass
Posts: 20
Joined: Fri May 25, 2012 5:04 am

[Solved] Drag cell without source reverting to default style

Post by robglass »

Dear OO Community,

When moving cells on a calc sheet, the source cells revert to an unattractive default format.

By what means can I make cell styles unchangeable ?

Upon entering new data in the now-empty source cells, I would like that data shown in my preferred format.

Thanks !

Rob Glass
Last edited by MrProgrammer on Sun Dec 20, 2020 5:30 am, edited 1 time in total.
Reason: Tagged ✓ [Solved]
OpenOffice 4.1.5 and FireFox 60.0.1 on MacOS 10.13.4
User avatar
MrProgrammer
Moderator
Posts: 4906
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Drag cells without source cell reverting to default form

Post by MrProgrammer »

robglass wrote:By what means can I make cell styles unchangeable?
There is no good way using drag. Drag means you want all of the cell's attributes (value, format, comments, etc.) moved elsewhere. So the attractive formatting is moved to the new cell and the original cell receives the Default style. However, perhaps you can alter the attributes of the Default style to ones which suit you better. There is no way to drag the value and format while retaining the format in the original cell.

Read about styles in Help → Index or in User Guides (PDF) or searching for topics about them in the Calc Forum.

If you hold the Option key on the Mac while dragging, this means to copy the cells to another location. Then you can return to the original cells and clear the values using the Backspace key. I realize this is an additional step. This technique will not be suitable if the cells contains formulas with relative references or if there are references to the cells you want to drag. [Tutorial] Formula Adjustments during Copy and Move

I suggest you continue to use drag, then reapply the attractive formatting to the original cells using a style. I realize that is an extra step. Further discussion about this topic is in [Solved + Issue] Cutting a cell takes all formatting away.

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.
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).
robglass
Posts: 20
Joined: Fri May 25, 2012 5:04 am

Re: Drag cells without source cell reverting to default form

Post by robglass »

Dear Mr. Programmer,

Command + C of highlighted cell(s) or pressing option while dragging (copy) will not alter source cell format.
Deleting source cells removes only contents, cell format is not changed. Data entered in these newly empty cells will display in familiar format
Command + X of highlighted cell(s) returns source cell format to default.

I did not know about pressing option while dragging. Way more useful than your fascinating though complicated macro. Python intrigues me. I admire people who grasp it.

Thanks for your wise advise !

Rob Glass
OpenOffice 4.1.5 and FireFox 60.0.1 on MacOS 10.13.4
User avatar
keme
Volunteer
Posts: 3704
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: Drag cells without source cell reverting to default form

Post by keme »

If all the cells in question have the same formatting, you can also change the Default style to the formatting you need.
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Drag cells without source cell reverting to default form

Post by Villeroy »

Source: Ctrl+C, Backspace
Target: Ctrl+V
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Lupp
Volunteer
Posts: 3552
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Drag cells without source cell reverting to default form

Post by Lupp »

If you started to drag the selected range and press the Ctrl-key in addition then in advance of droppoing, the range will be copied (like with Ctrl+C / Ctrl+V) instead of moved (Ctrl+X / Ctrl+V).
Of course, this does not only apply to the formats, but also to the contents.
To copy formats only (without changing the settings for Ctrl+Shift+V):
-1- Select
-2- Del
-3- Ctrl+C
-4- Ctrl+Z
-5- Go to target
-6- Ctrl+V
I cannot imagine a way to modify drag-and-drop to act as if this sequence was applied.
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
Post Reply