+ Reply to Thread
Results 1 to 8 of 8

Macro to search & replace then copy to another column on the same row?

  1. #1
    Registered User
    Join Date
    03-09-2011
    Location
    utah, usa
    MS-Off Ver
    excel 2007
    Posts
    23

    Cool Macro to search & replace then copy to another column on the same row?

    Hi,

    I have 3 columns D,E,and F

    D will have a list of manufacture names, E will have category Names, and F will have a description of the products.

    Example:

    D=FOXCONN, GIGABYTE, INTEL
    E=MOTHERBOARD
    F=GA/1366/I7/X58/3XF/SATA3/USB3

    What i am trying to do is search for a specific data value on F description when data value is found replace that value with a value i choose but copy it to E Column after the Category Name on the same row. But it can only search within a particular manufacture and Category which is on column D and E.

    Example:

    Only search if Manufacture Gigabyte on column d, with the Category Name Motherboard on column e is present. If there present then search and find I7 on column F (match) and then I7 will be replaced with name of choosing which is |Core I7 and joined after Column E MOTHERBOARD

    Example Finished:

    E=MOTHERBOARD|CORE I7

    I have been working on this for awhile and searched everywhere to see if there was example of what i am trying to accomplish. I don't have much experience with VB Macros so your help would be appreciated.

  2. #2
    Registered User
    Join Date
    03-09-2011
    Location
    utah, usa
    MS-Off Ver
    excel 2007
    Posts
    23

    Question re: Macro to search & replace then copy to another column on the same row?

    Anybody have any ideas of how to do this. Or do you need more clarification on what i am trying to do?

    thanks

  3. #3
    Valued Forum Contributor StevenM's Avatar
    Join Date
    03-23-2008
    Location
    New Lenox, IL USA
    MS-Off Ver
    2007
    Posts
    910

    re: Macro to search & replace then copy to another column on the same row?

    Perhaps you could upload your worksheet (or a mockup of your worksheet).

  4. #4
    Registered User
    Join Date
    03-09-2011
    Location
    utah, usa
    MS-Off Ver
    excel 2007
    Posts
    23

    re: Macro to search & replace then copy to another column on the same row?

    Here is an attachment and hopefully it helps you on what i am trying to accomplish.

    D, E, and F are the columns with the data.

    J, K, and L are what it is supposed to look like after the macro is completed.

    F column is where the data is located on the search.

    thanks
    Attached Files Attached Files
    Last edited by ucsutah; 05-08-2012 at 04:00 PM.

  5. #5
    Valued Forum Contributor StevenM's Avatar
    Join Date
    03-23-2008
    Location
    New Lenox, IL USA
    MS-Off Ver
    2007
    Posts
    910

    re: Macro to search & replace then copy to another column on the same row?

    Backup your data!
    I don't think I fully understood what you need.
    Run this macro, and tell me how I can make it better.
    Between running the macro, and reading my comments in the code,
    perhaps you can better explain what you need.

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    03-09-2011
    Location
    utah, usa
    MS-Off Ver
    excel 2007
    Posts
    23

    re: Macro to search & replace then copy to another column on the same row?

    yes, its almost exactly what i need. Instead of putting the results on column k, i need the results to be on column e?

    thanks

  7. #7
    Valued Forum Contributor StevenM's Avatar
    Join Date
    03-23-2008
    Location
    New Lenox, IL USA
    MS-Off Ver
    2007
    Posts
    910

    Re: Macro to search & replace then copy to another column on the same row?

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    03-09-2011
    Location
    utah, usa
    MS-Off Ver
    excel 2007
    Posts
    23

    Re: Macro to search & replace then copy to another column on the same row?

    thats it, thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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