1

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.

  • Copy the Cell, and Right Click and hover on Paste, and you should see Paste Formula? – Darius Jan 13 '18 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 Jan 13 '18 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 Jan 13 '18 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 Jan 13 '18 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 Jan 13 '18 at 13:16
3

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.

  • Cool, this seems to be the most relevant answer. Is there a hotkey for enabling this view? – Suncatcher Jan 14 '18 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 Jan 14 '18 at 16:12
  • 1
    I was not correct - there IS other hotkey: Ctrl + ` (grave accent) - or, if it does't work - Ctrl + , (comma). – MarianD Jan 25 '18 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)

  • 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 Jan 14 '18 at 15:21
  • F2 then ctrl+shift+home then ctrl+c – Alex M Feb 6 at 1:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.