+ Reply to Thread
Results 1 to 5 of 5

find value, copy value of adjacent cell and paste it on another sheet

  1. #1
    Registered User
    Join Date
    01-27-2012
    Location
    Bratislava, Slovakia
    MS-Off Ver
    Excel 2003
    Posts
    3

    find value, copy value of adjacent cell and paste it on another sheet

    Hi all,
    I am new here and quite newbie to VBA. I would very appreciate your help.

    I need a macro, that would:
    -take the value from C3 (ID) on sheet "june"
    -then find it on sheet "july"
    -copy value of cell H (price) in that row
    -paste it back on sheet "june" in cell J in the row that ID was taken

    - repeatedly for all rows

    The problem is, that this huge file (cca 5000 rows) slightly differs from month to month, so some of the IDs will not
    be found on second sheet.

    Its killing me every month, please help

    Thanks a lot ahead!
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,066

    Re: find value, copy value of adjacent cell and paste it on another sheet

    Could you not use a formula?
    such as
    =VLOOKUP(C3,july!C1:J43,6,0)
    Placed in J3
    Then drag it down.

  3. #3
    Registered User
    Join Date
    01-27-2012
    Location
    Bratislava, Slovakia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: find value, copy value of adjacent cell and paste it on another sheet

    Thanks Dave, that was a good hint, anyway I had to modify it because it returned error
    I am goin to sleep wiser a bit


    =VLOOKUP(C25;july!C25:H65;6;FALSE)

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,066

    Re: find value, copy value of adjacent cell and paste it on another sheet

    Checkout
    =iferror()

  5. #5
    Registered User
    Join Date
    01-27-2012
    Location
    Bratislava, Slovakia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: find value, copy value of adjacent cell and paste it on another sheet

    =VLOOKUP(C3;july!$C3:$H43;6;FALSE)

+ 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