+ Reply to Thread
Results 1 to 8 of 8

update information on sheet1 from sheet2

  1. #1
    Forum Contributor
    Join Date
    06-29-2012
    Location
    Calgary CA
    MS-Off Ver
    Excel 2010
    Posts
    117

    update information on sheet1 from sheet2

    Hi Gurus:

    I need a VBA code to help me update information on sheet1 from sheet2.
    I have my sample file attached and a Pseudo code written.

    Thanks and have a great day!

    Chris


    Pseudo Code:
    1, For the first item(cell B2) in column B in sheet1, search a match from the whole column C in sheet2
    2, Once the first match is found at cell Ci of sheet2, stop searching.
    3, Copy the content from cell Hi of sheet2 to cell E2 of sheet1.
    4, Repeat the above steps for cell B3,B4,B5.......

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: update information on sheet1 from sheet2

    Aviate,
    It would be easier and faster to search all values in sheet 1 of column B. Any reason why you want stop after the first search?

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: update information on sheet1 from sheet2

    None of the values in column B match with any value in column C, so the return value is big NIL

  4. #4
    Forum Contributor
    Join Date
    06-29-2012
    Location
    Calgary CA
    MS-Off Ver
    Excel 2010
    Posts
    117

    Re: update information on sheet1 from sheet2

    Quote Originally Posted by AB33 View Post
    None of the values in column B match with any value in column C, so the return value is big NIL
    That is just sample file, the actually file is much larger so there must be matches. Thanks.

  5. #5
    Forum Contributor
    Join Date
    06-29-2012
    Location
    Calgary CA
    MS-Off Ver
    Excel 2010
    Posts
    117

    Re: update information on sheet1 from sheet2

    Quote Originally Posted by AB33 View Post
    Aviate,
    It would be easier and faster to search all values in sheet 1 of column B. Any reason why you want stop after the first search?
    Hi ABB33:
    Thanks for your response,
    Because there are a lot same values in that column, keep searching makes no sense.
    Thanks
    Chris

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: update information on sheet1 from sheet2

    Chris,
    I have attached two codes. Try them and let me know how you progress.

  7. #7
    Forum Contributor
    Join Date
    06-29-2012
    Location
    Calgary CA
    MS-Off Ver
    Excel 2010
    Posts
    117

    Re: update information on sheet1 from sheet2

    Hi AB33:
    Sorry for my delayed response as I only work on Firday afternoon.

    The code works perfectlly and I appreciate your help!

    Have a great weekend!

    Chris

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: update information on sheet1 from sheet2

    Chris,
    You are welcome!
    Glad to know one of the code has worked for you. It was partly a guess work

+ 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