2

There are many questions about copying values instead of formulas, but what I am seeking is exactly the opposite. I want copy the formula itself, not the result of its calculation from some cell, and not the copied formula with adjusted cell addresses.

A picture worth a thousand words. On this picture I outlined the desired value

enter image description here

What I want to have in my clipboard and paste into D6 is not 629bb706a18c16ad87640f253a745841, not the next generated GUID, but exactly this string:

=LOWER(CONCATENATE(DEC2HEX(RANDBETWEEN(0,4294967295),8), DEC2HEX(RANDBETWEEN(0,42949),4)...

Is there any way to copy it directly being positioned on cell, without putting cursor to formula bar? Is there any hotkey for this?

I am not seeking programming solutions, but AHK-based ones are okay.

5
  • Copy the Cell, and Right Click and hover on Paste, and you should see Paste Formula?
    – Darius
    Commented Jan 13, 2018 at 13:01
  • Yes, I see it. But when I press "Paste formula", again, it pastes the next generated value, i.e. already evaluated/calculated result, not formula itself.
    – Suncatcher
    Commented Jan 13, 2018 at 13:06
  • Wait.. let me confirm whether you wanted to see the "result" of the formula on the cell? (and the Formula itself on the Function Field) - or you wanted to paste the actual Formula into the Cell?
    – Darius
    Commented Jan 13, 2018 at 13:10
  • No, I want formula expression that is seen in function field. I clearly showed what I want on the screenshot (marked by red square).
    – Suncatcher
    Commented Jan 13, 2018 at 13:12
  • I'm not familiar with AHK, but without moving your mouse over to the function key, you can copy and paste into a new cell, press F2, Home, and then put a ' (single quote) at the beginning of the function which will treat the formula as text and will display exactly that. So if you are familiar with AHK, you can probably script AHK to do exactly that (after you paste, F2, Home, ', enter) ? Edit: Sorry I just re-read your title and you wanted the formula into the clipboard? Then F2, Ctrl A, Ctrl C - and it is in the clipboard - possible in AHK maybe - not too familiar with it.
    – Darius
    Commented Jan 13, 2018 at 13:16

2 Answers 2

4

In the ribbon, select Formulas tab and then Show formulas.

Instead of values you will see in all cells directly formulas, so you may copy/paste them as you wish.

3
  • Cool, this seems to be the most relevant answer. Is there a hotkey for enabling this view?
    – Suncatcher
    Commented Jan 14, 2018 at 16:03
  • No other than pressing the ALT key and then follow pressing appropriate letter keys (displayed by pressing that key). (You may use AutoHotKeys for it.)
    – MarianD
    Commented Jan 14, 2018 at 16:12
  • 3
    I was not correct - there IS other hotkey: Ctrl + ` (grave accent) - or, if it does't work - Ctrl + , (comma).
    – MarianD
    Commented Jan 25, 2018 at 12:21
1

There is no way to do it directly with a single hot-key.
However, you can avoid the explicit clicking by using the sequence F2 CTRL+A CTRL+C. The formula bar does not even need to be visble for that (but it still uses it)

2
  • That seems acceptable, but! But Ctrl-A doesn't work for me after F2. I can select formula only manually with Shift + Arrows, which is a mess.
    – Suncatcher
    Commented Jan 14, 2018 at 15:21
  • F2 then ctrl+shift+home then ctrl+c
    – Alex M
    Commented Feb 6, 2019 at 1:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .