Change Part Of Cell Content

  • Hi.

    In Excell 2000, when you enter a cell by using either the cursor keys or the enter key, the contents of that cell are selected. Typing anything other than the 'F2' key deletes the current entry in the cell, replacing it with what you are typing. This is not the same as double clicking on a cell whereby the cell does not have any of it's contents selected so that when you type the keys are inserted at the cursor position

    Is there any way in which this behaviour can be changed so that the first and subsequent characters typed after entering the cell are added to the end of the current contents of the cell ?





    Application.SendKeys ("{F2}")
  • Re: Change Part Of Cell Content

    Hi Dave,

    Thanks for answering so promptly.

    What you say is quite true, however, I am trying to "streamline" data entry so that the user (ie me....) can keep bashing away without having to keep moving to the mouse, double clicking etc etc. The natural direction of the input is straight down the sheet, hence the use of the enter key.

    Essentially I'm designing a Technical design work book which keeps track of the tech design of large programs, including the development times etc etc. Part of the process is typing in the PDL of the method that is being designed. This requires indentation in places and having to do that manually is a chore. The PDL eventually turns into the comments of the program, with the real code being filled in underneath.

    So now, dependant on the code in the row above, the spreadsheet automatically indents the following row, placing the cursor at the end of the indent ready for the next line of PDL.

    The work book currently interfaces with SAP to get domain and data element declarations that may be mentioned and subsequently will then upload any custom declarations that have been made in the PDL, saving a lot of time and bother.

    Thats the reason why I wanted to be able to get Excel to 'pre-populate' a cell and then enable me to add stuff to it without removing the previous contents when the cell is entered either after using the enter key or one of the cursor keys.

    I must admit, I did try searching here before I entered my original post but must have been using the wrong search words. Your system did pick up on my mention of F2 though and provided me with an answer.

    You say that SendKeys is a hack, which is fair enough. Is there another way of doing this ? For example possibly by changing the edit mode of the cell (I'm not sure of the right terminology) from "Selected" to "Append" ??



  • Re: Change Part Of Cell Content


    The natural direction of the input is straight down the sheet, hence the use of the enter key

    Tools>Options-Edit Move Selection After Enter.

    Navigate via the Tab Key through Unlocked cells on a Protected Worksheet (no select Locked cells) is another.

    Select a range and Tab is another.

    Named Ranges is another fast way to get to a range and have it selected ready for Tabbing.

    IMO, you will end-up causing more problems than you are to solve. Also, I'm locking this thread as you GUESSED you answer in the Thread Title instead of what you would like to achieve.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!