+ Reply to Thread
Results 1 to 3 of 3

Macro that does the same for every cell

  1. #1
    Registered User
    Join Date
    02-13-2013
    Location
    Slovenia
    MS-Off Ver
    Excel 2003
    Posts
    1

    Macro that does the same for every cell

    I didn't knew what title to give this thread. I have a sheet, where in A1 i have John Doe, under A2 i have Patrick Swayze... etc etc you get the picture. Now i want to make a macro button which does the following: A1 John and B1 Doe, A2 Patrick and B2 Swayze. Do you understand me? Now i never worked with macros before and i never even touched visual basic. But i've made the following. It works, but it always puts the same names
    This is the code
    Please Login or Register  to view this content.
    now if i select A1 where John Doe is and run the macro, it puts John in A1 and Doe in B1, which is good. But if i select patrick swayze which is in A2 and run the macro, it puts John in A2 and Doe in B2 but it should be Patrick in A2 and Swayze in B2
    Last edited by WadeWilson; 02-13-2013 at 09:11 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: Macro that does the same for every cell

    You can do that easily without a macro by using the Data/Text To Columns option.
    http://office.microsoft.com/en-us/ex...010102340.aspx

  3. #3
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Macro that does the same for every cell

    Select the cells in column A that have the format firstname/singlespace/lastname
    and run this macro:

    Please Login or Register  to view this content.
    Gary's Student

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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