+ Reply to Thread
Results 1 to 8 of 8

Macro to update database, Match Cell value from Sheet 1 in Sheet 2 then copy and paste

  1. #1
    Registered User
    Join Date
    12-02-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    9

    Macro to update database, Match Cell value from Sheet 1 in Sheet 2 then copy and paste

    Hey guys

    For the last few days i have been trying to build a macro with limited knowledge, i have looked through countless threads but still not luck

    I have a excel spread sheet with Sheet 1 being where all the information is held and the hope is to paste information into sheet 2 and then run a macro which updates sheet 1

    I am using some web ranking software which puts out the results in a CSV format and in alphabetical order

    What i need to do is search sheet 2 to match a cell value from sheet 1 and then copy a corresponding cell (same row a few cells over) from sheet 2 to sheet 1

    this needs to be repeated for every line of sheet 1

    any help would be greatly appreciated

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Macro to update database, Match Cell value from Sheet 1 in Sheet 2 then copy and paste

    Hi

    From your description, VLOOKUP should bring back the data you are chasing. Try looking at that function.

    If that won't do it, then put up an example file for review.

    rylo

  3. #3
    Registered User
    Join Date
    12-02-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Macro to update database, Match Cell value from Sheet 1 in Sheet 2 then copy and paste

    Quote Originally Posted by rylo View Post
    Hi

    From your description, VLOOKUP should bring back the data you are chasing. Try looking at that function.

    If that won't do it, then put up an example file for review.

    rylo
    Thanks for the reply, i will start looking into it now

    I've attached a mock spreadsheet,

    Its in the same format, as you can see the keyword cell needs to be matched then the 'position' cell copied and pasted

    There are hundreds of keywords

    Cheers
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Macro to update database, Match Cell value from Sheet 1 in Sheet 2 then copy and paste

    Hi

    Based on your example file, exactly what do you want to copy from where, and put to where? There doesn't seem to be any relationship between the numbers on the 2 sheets.

    rylo

  5. #5
    Registered User
    Join Date
    12-02-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Macro to update database, Match Cell value from Sheet 1 in Sheet 2 then copy and paste

    Quote Originally Posted by rylo View Post
    Hi

    Based on your example file, exactly what do you want to copy from where, and put to where? There doesn't seem to be any relationship between the numbers on the 2 sheets.

    rylo
    Sorry yea i just put in random numbers, in the real one the numbers will either be the same or 1 unit higher or lower

    I need to copy the position numbers from sheet 2 and paste them into the column called '11'.

    I would need to do this every week, so next week it would be placed into column 12. ( to avoid changing the macro week by week i was just going to paste to results in several columns to the right then move it to the correct location)
    Last edited by Zawoooo; 12-02-2012 at 10:03 PM.

  6. #6
    Registered User
    Join Date
    12-02-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Macro to update database, Match Cell value from Sheet 1 in Sheet 2 then copy and paste

    Updated the file
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Macro to update database, Match Cell value from Sheet 1 in Sheet 2 then copy and paste

    Hi

    try this

    Please Login or Register  to view this content.
    rylo

  8. #8
    Registered User
    Join Date
    12-02-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Macro to update database, Match Cell value from Sheet 1 in Sheet 2 then copy and paste

    Brilliant!

    Thanks a lot mate, really appreciate it

+ 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