+ Reply to Thread
Results 1 to 2 of 2

update cells from 1 sheet to another

  1. #1
    Registered User
    Join Date
    02-23-2010
    Location
    San Antonio, Texas
    MS-Off Ver
    Excel 2007
    Posts
    1

    update cells from 1 sheet to another

    How can i create a macro or something that finds value A on spread sheet 1 then takes the value located the cell next to it, call it value B and then finds value A on a spread sheet 2 and pastes value B in the cell next to it?

    I hope that makes sense. I need to update prices from one spread sheet to another by using a unique product ID that is in both sheets.

    Thanks in advance!!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: update cells from 1 sheet to another

    I would use a formula on spreadsheet 2 in column C to do the search.

    In Sheet2!C2:

    =IF(ISNUMBER(MATCH(A1, Sheet1!A:A, 0)), INDEX(Sheet1!B:B, MATCH(A1, Sheet1!A:A, 0)), B1)

    Then copy that cell down column C. All the NEW prices will appear or the old price from the current page if the item is not found on Sheet1.

    Then, copy the new price column C, then EDIT>PasteSpecial>Values into column B...clear column C and you're done.

    You could write all that into a pretty quick macro, just using the macro recorder...
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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