+ Reply to Thread
Results 1 to 3 of 3

Using a macro to edit from selection

  1. #1
    Registered User
    Join Date
    11-29-2021
    Location
    London
    MS-Off Ver
    10
    Posts
    5

    Using a macro to edit from selection

    I'm making an Index more useful. Where there are entries like

    Australia's unusual mammals in Tasmania

    I'm duplicating the entries then putting the word I want at the front, to give eg

    mammals : Australia's unusual in Tasmania and
    Tasmania : Australia's unusual mammals in

    Can I get something like this to run, when I've selected the word I want first? :

    Sub PutWordFirst()

    SendKeys "{Control}({X})"
    SendKeys "{UP}" 'moves insertion point to start of cell
    SendKeys "{Control}({V})"
    SendKeys " : "

    End Sub

    Perhaps MS Word would be better.

  2. #2
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Using a macro to edit from selection

    Without VBA you could simply set it up like this where you have your original text in column B, your word in Column C and this in column D

    Please Login or Register  to view this content.
    and dragged down

    See attached example
    Attached Files Attached Files
    Happy with my advice? Click on the * reputation button below

  3. #3
    Registered User
    Join Date
    11-29-2021
    Location
    London
    MS-Off Ver
    10
    Posts
    5

    Re: Using a macro to edit from selection

    That's neat, thanks.

    Must try Word, though!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Edit to Row Selection in pre-written VBA Code
    By NicoleAL123 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-17-2018, 04:17 PM
  2. How to - Move, edit and duplicate selection of cells
    By Martin7R in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-24-2015, 07:28 AM
  3. Edit edit links macro to automate sheet selection
    By sds1126 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-07-2015, 12:27 PM
  4. [SOLVED] please help on addins for copy selection, paste to a new workbook and edit the title
    By ruliansyah in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-27-2013, 01:14 AM
  5. Edit Macro for Autofill and sorting to not to define specific cells
    By catcud in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-24-2012, 06:07 PM
  6. Tools-Options-Edit-Move Selection
    By kc27315 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-10-2008, 10:04 AM
  7. Edit selection
    By lckjob in forum Excel General
    Replies: 2
    Last Post: 12-15-2006, 04:54 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1