+ Reply to Thread
Results 1 to 6 of 6

Macro To Update Cells In Work Sheet

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-15-2007
    Location
    Bend, Oregon
    MS-Off Ver
    Office 2016 Windows
    Posts
    161

    Macro To Update Cells In Work Sheet

    Hello,

    Thanks in advance for such a great site, everyone has been most helpful.

    I have two sheets, Current and Master. The Master sheet has the current pricing that I need to copy to Current Sheet. The common row is "A", this has the model number in both sheets. In the Current sheet, there may be duplicate model numbers in row "A", that is fine, need to update all pricing. I need sheet "Current" to search the "Master" and get the new pricing and copy to "Current".

    Sheet Structure,

    Master Sheet
    Column A (model number)
    Column C (price)

    Current Sheet
    Column A (model Number)
    Column F (price)

    So Current column "A" needs to check Master "A", if model numbers same update price from Master "C" to Current "F".

    Thank you,

    JR

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Quote Originally Posted by gaspower
    Hello,

    Thanks in advance for such a great site, everyone has been most helpful.

    I have two sheets, Current and Master. The Master sheet has the current pricing that I need to copy to Current Sheet. The common row is "A", this has the model number in both sheets. In the Current sheet, there may be duplicate model numbers in row "A", that is fine, need to update all pricing. I need sheet "Current" to search the "Master" and get the new pricing and copy to "Current".

    Sheet Structure,

    Master Sheet
    Column A (model number)
    Column C (price)

    Current Sheet
    Column A (model Number)
    Column F (price)

    So Current column "A" needs to check Master "A", if model numbers same update price from Master "C" to Current "F".

    Thank you,

    JR
    =VLOOKUP(A1,Master Sheet!A:C,2,False)
    HTH

  3. #3
    Forum Contributor
    Join Date
    07-15-2007
    Location
    Bend, Oregon
    MS-Off Ver
    Office 2016 Windows
    Posts
    161
    Hello,

    Thank you for the response. Do I insert this in the cell or in the visual basic editor.

    JR

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Quote Originally Posted by gaspower
    Hello,

    Thank you for the response. Do I insert this in the cell or in the visual basic editor.

    JR
    Hi,

    This is a standard (probably the most used) Excel function, so just enter it in a cell.

    Rgds

  5. #5
    Forum Contributor
    Join Date
    07-15-2007
    Location
    Bend, Oregon
    MS-Off Ver
    Office 2016 Windows
    Posts
    161
    Hello,

    Thank you. Sorry, I am new to Excel language. I do not understand how the code =VLOOKUP(A1,Master Sheet!A:C,2,False) knows how to replace pricing in current sheet? I just see Master Sheet in code?? Sorry.. I also tried to paste it in the A1 cell of current sheet, and it just brings up a window.

    Thanks JR

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Quote Originally Posted by gaspower
    Hello,

    Thank you. Sorry, I am new to Excel language. I do not understand how the code =VLOOKUP(A1,Master Sheet!A:C,2,False) knows how to replace pricing in current sheet? I just see Master Sheet in code?? Sorry.. I also tried to paste it in the A1 cell of current sheet, and it just brings up a window.

    Thanks JR
    Hi,

    I'm attaching an example workbook showing the VLOOKUP() formula in column F of the Current Sheet.

    Regards
    Attached Files Attached Files

+ 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