Link to home
Start Free TrialLog in
Avatar of Steve_Brady
Steve_BradyFlag for United States of America

asked on

Shortcut for selecting the contents of a cell in Excel

Hello,

As far as I know, there are three* different ways to copy the contents of a cell in Excel (2010):

1) You can simply click the cell and copy.
2a) You can double-click inside the cell, select its contents, and then copy.
2b) After clicking the cell, you can select the contents in the formula bar and copy.

I am fairly certain that numbers 2a & 2b are identical.*  As we all know however, significant differences exist between #1 and #2.

Is there any way to shortcut #2?  Obviously, double clicking is as simple and quick as a single click. However, selecting all the contents — when measured on the microsecond scale and multiplied by the thousands (or more) times we do it — is a bit more problematic.

It would be nice if there was a way to shortcut the process (if a way doesn't already exist and your jaw just dropped thinking, "Brady, you haven't known about that all this time?!").  If the shortcut does not exist then would it be hard to write a macro and attach it to something like holding down a key while you click or double right clicking, etc.?

Thanks


*Please correct any errors, if needed, in my statements.
ASKER CERTIFIED SOLUTION
Avatar of Rob Henson
Rob Henson
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
01. select Cell
02. Press F2 Key
03. Press Home key
04.Then press Shift + Home
05. Then Ctrl +V key and Ctrl+C
Good observation, teylyn.  Although the other solutions are technically valid, they don't really address the issue of additional keystrokes/clicks and/or don't challenge the underlying question of "why" you would need this functionality.
Avatar of Steve_Brady

ASKER

Thanks for all the great responses.

>>robhenson:
Pressing F2 activates the contents of the cell...


Thanks Rob. I was not aware of that option.


>>rorya:
You can assign that to a button or keyboard shortcut.


That is great rorya! I was hoping someone would contribute some VBA code to enable this option. One question I have however is on the topic of assigning hotkeys:  

The Macro options box in Excel offers only the option of using the Ctrl key as a modifier for shortcut keys.  Is there any other way to create them in which that limitation is not present? If doing so is not available through some other means in Excel itself, can the hotkey be written right into the code?

For example, in my specific case, I can only use a trackball and it must be on the left side of the keyboard.  Therefore, the best option for me would be to hold down the right Ctrl key while clicking the cell.  I could do that using an AHK script but it would be nice to have it self-contained in Excel.


>>teylyn:
...The thing is: Why would you want to? If you need a formula to always refer to cell A1, no matter where you copy and paste it, then you should use absolute references


teylyn, as always, your comments are very insightful and helpful.  In response to your question, it seems that you were thinking primarily in the context of working with cells containing formulas. However, outside of that context, I seem to find myself copying the same cell in both ways (#1 & #2) quite frequently.  A couple of examples:

• I might decide to move a formula (which contains some relative cell references) from one cell to another simply for spreadsheet layout reasons.  For example, suppose I have a formula in cell E10 (containing relative references to A3 and B1:B3) which, for layout reasons, I decide to move to cell G15.  If I just cut/paste the cell, then as you pointed out, the references will change and I will no longer be drawing on the correct data which is still located in A3 and B1:B3.  Therefore, the #2 method must be used.

• Suppose I am working with some text and I want to insert text from one cell into the text of another.  For example, suppose the following cells contain the text shown:

A1 = Some great people responded to this thread!
A2 = and brilliant

and I want to insert cell A2's content into cell A1 to form:

A1 = Some great and brilliant people responded to this thread!

That is only possible by selecting the contents of A2 (method #2), not the cell itself.  And of course, both examples could easily need to be moved or copied in the #1 manner at any time as well.


ukerandi:
01. select Cell
02. Press F2 Key
03. Press Home key
04.Then press Shift + Home
05. Then Ctrl +V key and Ctrl+C


Is this missing a step or is something out of order?  It did not work for me in the order described.  Should it not be:

01. Select Cell
02. Press F2 Key
03. Press Shift + Home key
04.Then press Ctrl+C
05. Click the destination cell
06. Then press Ctrl +V
You can't assign keys in the code itself but you can:
1. Add it to the QAT or Ribbon so an Alt+key shortcut would work; or
2. Add it as a button on the right-click cell shortcut menus; or
3. Create an addin that monitored say a cell double-click with the Ctrl key held down.

Any preference?

Regards,
Rory
Steve,
if you want to move a cell containing a formula, you can also drag the cell to the new position. Select the cell and hover over the cell border until the mouse pointer changes to the four-way arrow. Then left click and drag the cell. That will not change the cell's formula.

With regards to inserting text from one cell into text into another cell, editing the cell contents with one of the options you outlined is the only way I can see, so there's no shortcuts to be had.

cheers, teylyn
>>teylyn:
Select the cell and hover over the cell border until the mouse pointer changes to the four-way arrow. Then left click and drag the cell. That will not change the cell's formula.


Life's little ironies. I felt somewhat relieved when that job-dropping comment above did not come to fruition regarding my initial question.  However, little did I realize that it would be appropriate later on in this thread.

"Simply drag the formula to a new location!" How I missed that one, I know not. But as always, when I find myself in this situation, I first try to focus so much on the glee evoked by knowing it will be part of my bag of tricks from here on out (and therefore save me many of those microseconds I mentioned), that it overshadows the anguish of realizing I have not been using it all this time.  :P

Secondly, despite my best efforts to avoid it, I know I will be plagued for quite some time, wondering what else there is I don't know* — particularly those things which, to everyone else, are so elementary, they would not even think to suggest them!

Arghhh!!  

Now I feel better.


Many thanks teylyn.


*"I worry a lot about the things I don't know — but at least I know that I don't know them. What really terrifies me though are the things I don't know and I don't even know that I don't know them!"
>>rorya:
You can't assign keys in the code itself but you can:
1. Add it to the QAT or Ribbon so an Alt+key shortcut would work; or
2. Add it as a button on the right-click cell shortcut menus; or
3. Create an addin that monitored say a cell double-click with the Ctrl key held down.

Any preference?



Preferences?  I'll take all three since I don't know how to do #1 and I've never heard of #2 or #3.  If #3 is also doable for Ctrl+single-click, that would be the best solution for the topic of this thread but I'd really love to understand all three for other uses.  However, please do not respond here.  Because these three options are each topics on their own and this function (selecting cell contents) provides a good example (I think), I will shortly begin three new threads.

Thanks Rory
Thanks