Results 1 to 8 of 8
  1. #1
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Chapel Hill, North Carolina, USA
    Posts
    138
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Insert text (via macro or other) while editing cel (2000/XP)

    Is it possible to add a pre-canned set of text into a cell automatically while entering data in the cell. For example, I might type "Turn left at " and then want Excel to enter one of 8 street names and then keep typing. I am trying to find a way to do without creating formulas using "&" . I have written a macro which adds text to an existing cell, but I must finish typing, leave the cell and re-select the cell before running the macro. Is there a way to run the macro while I am still editting text in the cell? or solving this another way?

    Thanks!

    Larry

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Insert text (via macro or other) while editing cel (2000/XP)

    You can use Data | Validation... with the List option to display a dropdown list when you select a cell.

    If you clear the "Show error alert after invalid data is entered" check box in the Error Alert tab of the Validation dialog, the user can enter a value (which does not need to be in the list) or select an item from the list.

    I don't think it is possible to run a macro while you are editing a cell's contents.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Ankeny, Iowa, USA
    Posts
    298
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Insert text (via macro or other) while editing cel (2000/XP)

    If I understand your request correctly, you should be able to do this with Tools>Autocorrect. Set up a code that you otherwise won't type such as 1a for the first street name, 2a for the second, etc. and in the Replace Text as you Type section, have it replace your short codes with the full street name.

    Hope that helps.

    -Brett

  4. #4
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Chapel Hill, North Carolina, USA
    Posts
    138
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Insert text (via macro or other) while editing cel (2000/XP)

    Hans - thanks for the repply - I should have mentioned that I am not filling the cell with the inserted text - I need to insert text in the middle of free text entered by the user. As I understand data validation, the selected item fills the entire cell. I may talk with the fellow who will actually use this and perhaps he can select the text first and then enter comments around it....hmmm.....

    Thanks again!

    Larry

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Insert text (via macro or other) while editing cel (2000/XP)

    As far as I know, what you want is not possible. Perhaps someone can prove me wrong.

  6. #6
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Chapel Hill, North Carolina, USA
    Posts
    138
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Insert text (via macro or other) while editing cel (2000/XP)

    Brett,

    You are the man!!!! I didn't consider this feature - was too busy trying to be cute with macros!

    Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!!

    Larry

  7. #7
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Chapel Hill, North Carolina, USA
    Posts
    138
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Insert text (via macro or other) while editing cel (2000/XP)

    Hans - the answer is AutoCorrect (thanks to Brett - see thread).

    Thanks again for the quick reply!

    Larry

  8. #8
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Chapel Hill, North Carolina, USA
    Posts
    138
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Insert text (via macro or other) while editing cel (2000/XP)

    Brett,

    You are the man!!!! I didn't consider this feature - was too busy trying to be cute with macros!

    Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!! Thank you!!

    Larry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •