Copy a cell and paste its value

Discuss the spreadsheet application

Copy a cell and paste its value

Postby tbrantly » Sun Feb 21, 2010 5:38 pm

How do I remove the formula from a cell and replace it with the value the formula calculated?

Title Edited. A descriptive title for posts helps others who are searching for solutions and increases the chances of a reply (Hagar, Moderator).
Tom Brantly
OpenOffice 3.1 on Windows XP
tbrantly
 
Posts: 6
Joined: Sun Feb 21, 2010 5:30 pm

Re: Problem with spreadsheet

Postby Robert Tucker » Sun Feb 21, 2010 5:52 pm

Why would you want to do that?
LibreOffice 4.x.x on Fedora 21 and Ubuntu 14.10 (Dual Boot)
User avatar
Robert Tucker
Volunteer
 
Posts: 1242
Joined: Mon Oct 08, 2007 1:34 am
Location: Manchester UK

Re: Problem with spreadsheet

Postby Hagar Delest » Sun Feb 21, 2010 11:35 pm

You mean the equivalent of the Paste>Value in MS Excel?

Try the long click on the paste icon (or click its little arrow) and use Unformatted text.

Thanks to add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.
AOO 4.1.1 on Windows 7 and Xubuntu 14.10 (Utopic Unicorn)
User avatar
Hagar Delest
Moderator
 
Posts: 26206
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Problem with spreadsheet

Postby vasa1 » Mon Feb 22, 2010 6:33 am

Hagar de l'Est wrote:You mean the equivalent of the Paste>Value in MS Excel?

Try the long click on the paste icon (or click its little arrow) and use Unformatted text.

Thanks to add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.


I searched for the keyboard equivalent but couldn't find it. Is there one? I've been using the more cumbersome "Alt, edit, paste special", and then changing the defaults to exclude "paste all", "paste formulas" and "paste formats", but to include numbers. Of course, this has to be done only once per session. After the first time I set it, it is just Alt, E, S, enter, enter.

And Robert Tucker asked, "Why would you want to do that?". Well, in my case, I don't need the formula that generated the value in a temp worksheet any more.
LibreOffice 3.5.3.2 on Ubuntu 12.04
vasa1
 
Posts: 254
Joined: Sat Dec 26, 2009 1:20 pm
Location: Bombay

Re: Problem with spreadsheet

Postby Hagar Delest » Mon Feb 22, 2010 11:24 am

vasa1 wrote:I searched for the keyboard equivalent but couldn't find it. Is there one?

No idea, I usually prefer to use the buttons instead of the keyboard.
AOO 4.1.1 on Windows 7 and Xubuntu 14.10 (Utopic Unicorn)
User avatar
Hagar Delest
Moderator
 
Posts: 26206
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Problem with spreadsheet

Postby vasa1 » Mon Feb 22, 2010 11:51 am

Hagar de l'Est wrote:
vasa1 wrote:I searched for the keyboard equivalent but couldn't find it. Is there one?

No idea, I usually prefer to use the buttons instead of the keyboard.


That's okay! Gave me a chance to record my third ever macro :D . So now, Alt+V will do it for me.
LibreOffice 3.5.3.2 on Ubuntu 12.04
vasa1
 
Posts: 254
Joined: Sat Dec 26, 2009 1:20 pm
Location: Bombay

Re: Copy a cell and paste its value

Postby vasa1 » Tue Mar 09, 2010 6:34 pm

This is what the macro I recorded looks like:
Code: Select all   Expand viewCollapse view
sub MyPaste
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "SelectedFormat"
args1(0).Value = 1

dispatcher.executeDispatch(document, ".uno:ClipboardFormatItems", "", 0, args1())


end sub


I assigned Alt+V to it. If it's just one cell or just one row, pressing Alt+V pastes the unformatted contents, but if it's more than one row, I have to hit enter after Alt+V to complete the paste.
LibreOffice 3.5.3.2 on Ubuntu 12.04
vasa1
 
Posts: 254
Joined: Sat Dec 26, 2009 1:20 pm
Location: Bombay

Re: Copy a cell and paste its value

Postby acknak » Tue Mar 09, 2010 6:53 pm

This feature was added to OOo 3.2; you don't need a macro to do it.

There is a "paste unformatted" function, bound to Ctrl+Alt+Shift+V by default; you can bind a different key combination using the Tools > Customize dialog window.

Oops--Sorry. It works in Writer, but apparently not in Calc. My understanding is that the new function was supposed to apply to all the OOo applications, but maybe I missed something.
AOO 4 • Linux • Fedora 17
User avatar
acknak
Moderator
 
Posts: 19456
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Copy a cell and paste its value

Postby vasa1 » Wed Mar 10, 2010 4:33 am

acknak wrote:This feature was added to OOo 3.2; you don't need a macro to do it.

There is a "paste unformatted" function, bound to Ctrl+Alt+Shift+V by default; you can bind a different key combination using the Tools > Customize dialog window.

Oops--Sorry. It works in Writer, but apparently not in Calc. My understanding is that the new function was supposed to apply to all the OOo applications, but maybe I missed something.


I had the same experience. After making the macro, I too read about this "Ctrl+Alt+Shift+V" but didn't get it to work in Calc.
LibreOffice 3.5.3.2 on Ubuntu 12.04
vasa1
 
Posts: 254
Joined: Sat Dec 26, 2009 1:20 pm
Location: Bombay

Re: Copy a cell and paste its value

Postby Hagar Delest » Wed Mar 10, 2010 10:16 pm

vasa1 wrote:didn't get it to work in Calc.

+1 with OOo 3.2 and xubuntu 9.10. No shortcut at all linked to that shortcut.
AOO 4.1.1 on Windows 7 and Xubuntu 14.10 (Utopic Unicorn)
User avatar
Hagar Delest
Moderator
 
Posts: 26206
Joined: Sun Oct 07, 2007 9:07 pm
Location: France


Return to Calc

Who is online

Users browsing this forum: No registered users and 15 guests