Function to Copy and Paste As Unformatted Text

Is there a Function in Calc to Copy and Paste as Unformatted Text? I know how to do it manually, and I suppose that I could write a Macro to accomplish the task. The question is however, does such a function already exist?

Hello,

there is a function for that and it is called Paste Unformatted Text, which is by default assigned to shortcut CTRL+SHIFT+ALT+V. You may want to change that short via Tools -> Customize -> Tab: Keyboard and searching under Functions for Paste Unformatted

Note There is no function to copy unformatted text (i.e. cell data only)

Hope that helps.

Thank you, but as per the question, I am NOT looking for a series of keyboard actions to accomplish my goal; I want to know if there exists a function that can be applied to a Cell to copy and paste as unformatted text the contents of another cell.

I don’t understand, you cannot apply a function (i.e formula) to a cell which copies the content of another cell to itself and this way eliminating itself. And if you write a macro you need to provide the source cell and target cell by some method, so what should be the benefit of a macro and a popup asking for this information and to call that macro you need … to define a shortcut. The standard method to get the content (without any formatting) of another cell is by referring the content using e.g. =A1. So this makes no sense to me …

Sorry if I am being unclear; as a newbie things are seldom as they seem to be at first. If, for example, B1 is a mixed alpha/numeric/character string that is the result of a function applied to A1 and you set C1=B1, you do not get an (unformatted) text string; you get =B1 as the contents of C1 on the “Input Line”. However, if you manually copy B1 and paste it into C1 as unformatted text, you get that text string as the contents of C1 in the “Input Line”. You could create a keyboard macro to copy B1 and paste it into C1 as unformatted text ( which is the desired goal ) and run that macro, but that hardly seems to be the same as there being an existing Calc function that does the same. The closest thing that I find is the =CELL(“CONTENTS”,B1) function, but that function is what then appears in the “Input Line”. Setting D1=C1 then gets me closer, but still not where I want to be. Perhaps I should ask in a separate posting if custom Macros “travel” with the spreadsheet ( which might work )

@2TB: you might want to describe the overall task you are trying to solve. Because it seems you have some misconception regarding the functioning of spreadsheets; or maybe you use wrong tool for the task, or something. Of course you can create a macro that would set content of a cell to any text (including the text extracted from another cell); but is that a correct way to solve your task is unclear. It seems that you are asking “how to do X” when the correct would be “I need to do Y, and I imagined I need X for that, but actually I don’t know if that is the correct thing”.

Something like F2 - F9 - Enter (Edit, Recalculate, Exit edit mode)?

Mike: Thanks for the suggestion! I have created a spreadsheet that generates a unique output for each unique input. Changing the input changes the output; no problem there. But I don’t know how to “store” the output in a non-volatile manner. I am trying to create an output table, based on varying the input to the spreadsheet, and then analyze the output table. It may well be that a spreadsheet was not the best tool to try and solve the problem; but it worked right up until the last step! What else might you suggest?

Ok, if you use spreadsheet for the task, there are several possibilities (no idea which would fit the workflow).

  1. Use Data|Calculate|Formula to Value over the selected result. You might want to save the file as… to have original copy with formulas intact.
  2. Copy the result then Edit|Paste Special|Paste Special (Ctrl+Shift+V) to only paste values.
  3. Save file as CSV, without saving formulas. The resulting file would contain only values. But that would only save first sheet of the file.
  4. Yes, use macros - the extent may vary: from final copy of the result, to the whole processing of the input.

In fact, if your input is non-volatile (say, does not depend on date or random numbers), then simply saving copies of the spreadsheet with specific input set and formulas could be an option, too.

@mikekaganski, Formula to Value (first time I see it) is much better than F2 - F9 - Enter. So, please, delete my previous comment that contributes very little to the question. Thanks.

@LeroyG: no, the F2-F9-Enter trick is also very interesting, and may be used to calculate values on the fly, when you e.g. want to enter a value as calculated by a formula. Works nicely when you create the input, right before you end the cell input: e.g., you select a cell, type “=2+2”, press F9 then Enter instead of simple Enter.