Excel Formula Vlookup issue









up vote
0
down vote

favorite












I have 2 excel sheets ("sheet 1, sheet 2").



Sheet 1 and Sheet 2 have "product #" in column A and "price" in column C. I'm trying to write a formula that would allow Sheet 1 to lookup on sheet 2 if there is a Product # match In column A and if there is a product # match then to update on Sheet 1 Column C (Price) the product price from sheet 2. If there is no Match of product # from sheet 2 then to leave the price on sheet 1 alone.



I'm using this formula which returns a "0" on an error but I can't figure out how to modify it to leave price alone when there's no product # found.



=IFERROR(VLOOKUP(A2,updated!A:C,3,FALSE),0)


Thanks










share|improve this question



























    up vote
    0
    down vote

    favorite












    I have 2 excel sheets ("sheet 1, sheet 2").



    Sheet 1 and Sheet 2 have "product #" in column A and "price" in column C. I'm trying to write a formula that would allow Sheet 1 to lookup on sheet 2 if there is a Product # match In column A and if there is a product # match then to update on Sheet 1 Column C (Price) the product price from sheet 2. If there is no Match of product # from sheet 2 then to leave the price on sheet 1 alone.



    I'm using this formula which returns a "0" on an error but I can't figure out how to modify it to leave price alone when there's no product # found.



    =IFERROR(VLOOKUP(A2,updated!A:C,3,FALSE),0)


    Thanks










    share|improve this question

























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have 2 excel sheets ("sheet 1, sheet 2").



      Sheet 1 and Sheet 2 have "product #" in column A and "price" in column C. I'm trying to write a formula that would allow Sheet 1 to lookup on sheet 2 if there is a Product # match In column A and if there is a product # match then to update on Sheet 1 Column C (Price) the product price from sheet 2. If there is no Match of product # from sheet 2 then to leave the price on sheet 1 alone.



      I'm using this formula which returns a "0" on an error but I can't figure out how to modify it to leave price alone when there's no product # found.



      =IFERROR(VLOOKUP(A2,updated!A:C,3,FALSE),0)


      Thanks










      share|improve this question















      I have 2 excel sheets ("sheet 1, sheet 2").



      Sheet 1 and Sheet 2 have "product #" in column A and "price" in column C. I'm trying to write a formula that would allow Sheet 1 to lookup on sheet 2 if there is a Product # match In column A and if there is a product # match then to update on Sheet 1 Column C (Price) the product price from sheet 2. If there is no Match of product # from sheet 2 then to leave the price on sheet 1 alone.



      I'm using this formula which returns a "0" on an error but I can't figure out how to modify it to leave price alone when there's no product # found.



      =IFERROR(VLOOKUP(A2,updated!A:C,3,FALSE),0)


      Thanks







      excel formula






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 9 at 21:13









      Mako212

      3,6871624




      3,6871624










      asked Nov 9 at 19:52









      sender russell

      32




      32






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          The only caveat here is that you need to write this formula in a new column, let's say in D2, because you can't overwrite your original price with the formula.



          =IFERROR(VLOOKUP(A2,updated!A:C,3,FALSE),C2)


          This says, "if A2 matches a value in Column A of the Updated Sheet, return the price from Column C of the updated sheet, unless there is an error, in which case, use the original price on Sheet 1 (C2).






          share|improve this answer






















          • See my edited answer
            – cybernetic.nomad
            Nov 9 at 20:35

















          up vote
          0
          down vote













          You want to use INDEX/MATCH for this:



          Put the following formula in column C and populate down
          =IFERROR(IF(INDEX(Sheet2!B:B,MATCH(A2,Sheet2!A:A,0))=Sheet1!B2,B2,INDEX(Sheet2!B:B,MATCH(A2,Sheet2!A:A,0))),"")



          The MATCH will find, the row on Sheet2 with the same Product ID, the INDEX will return the matching price. If it matches the one on Sheet1, the formula returns the value on Sheet1 in column B. If it doesn't it will return the price from Sheet2






          share|improve this answer






















          • my bad I think I was not so clear in the question... I need the price to remain on sheet 1 either way, so for example.. if the formula finds a product # on sheet 2 so it should fill in the price on sheet 1 and if it doesn't find the product # on sheet 2 it should leave the price for that product # on sheet one alone without changing anything. Thanks!
            – sender russell
            Nov 9 at 20:24











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53232445%2fexcel-formula-vlookup-issue%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote



          accepted










          The only caveat here is that you need to write this formula in a new column, let's say in D2, because you can't overwrite your original price with the formula.



          =IFERROR(VLOOKUP(A2,updated!A:C,3,FALSE),C2)


          This says, "if A2 matches a value in Column A of the Updated Sheet, return the price from Column C of the updated sheet, unless there is an error, in which case, use the original price on Sheet 1 (C2).






          share|improve this answer






















          • See my edited answer
            – cybernetic.nomad
            Nov 9 at 20:35














          up vote
          0
          down vote



          accepted










          The only caveat here is that you need to write this formula in a new column, let's say in D2, because you can't overwrite your original price with the formula.



          =IFERROR(VLOOKUP(A2,updated!A:C,3,FALSE),C2)


          This says, "if A2 matches a value in Column A of the Updated Sheet, return the price from Column C of the updated sheet, unless there is an error, in which case, use the original price on Sheet 1 (C2).






          share|improve this answer






















          • See my edited answer
            – cybernetic.nomad
            Nov 9 at 20:35












          up vote
          0
          down vote



          accepted







          up vote
          0
          down vote



          accepted






          The only caveat here is that you need to write this formula in a new column, let's say in D2, because you can't overwrite your original price with the formula.



          =IFERROR(VLOOKUP(A2,updated!A:C,3,FALSE),C2)


          This says, "if A2 matches a value in Column A of the Updated Sheet, return the price from Column C of the updated sheet, unless there is an error, in which case, use the original price on Sheet 1 (C2).






          share|improve this answer














          The only caveat here is that you need to write this formula in a new column, let's say in D2, because you can't overwrite your original price with the formula.



          =IFERROR(VLOOKUP(A2,updated!A:C,3,FALSE),C2)


          This says, "if A2 matches a value in Column A of the Updated Sheet, return the price from Column C of the updated sheet, unless there is an error, in which case, use the original price on Sheet 1 (C2).







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 9 at 21:13

























          answered Nov 9 at 20:14









          Mako212

          3,6871624




          3,6871624











          • See my edited answer
            – cybernetic.nomad
            Nov 9 at 20:35
















          • See my edited answer
            – cybernetic.nomad
            Nov 9 at 20:35















          See my edited answer
          – cybernetic.nomad
          Nov 9 at 20:35




          See my edited answer
          – cybernetic.nomad
          Nov 9 at 20:35












          up vote
          0
          down vote













          You want to use INDEX/MATCH for this:



          Put the following formula in column C and populate down
          =IFERROR(IF(INDEX(Sheet2!B:B,MATCH(A2,Sheet2!A:A,0))=Sheet1!B2,B2,INDEX(Sheet2!B:B,MATCH(A2,Sheet2!A:A,0))),"")



          The MATCH will find, the row on Sheet2 with the same Product ID, the INDEX will return the matching price. If it matches the one on Sheet1, the formula returns the value on Sheet1 in column B. If it doesn't it will return the price from Sheet2






          share|improve this answer






















          • my bad I think I was not so clear in the question... I need the price to remain on sheet 1 either way, so for example.. if the formula finds a product # on sheet 2 so it should fill in the price on sheet 1 and if it doesn't find the product # on sheet 2 it should leave the price for that product # on sheet one alone without changing anything. Thanks!
            – sender russell
            Nov 9 at 20:24















          up vote
          0
          down vote













          You want to use INDEX/MATCH for this:



          Put the following formula in column C and populate down
          =IFERROR(IF(INDEX(Sheet2!B:B,MATCH(A2,Sheet2!A:A,0))=Sheet1!B2,B2,INDEX(Sheet2!B:B,MATCH(A2,Sheet2!A:A,0))),"")



          The MATCH will find, the row on Sheet2 with the same Product ID, the INDEX will return the matching price. If it matches the one on Sheet1, the formula returns the value on Sheet1 in column B. If it doesn't it will return the price from Sheet2






          share|improve this answer






















          • my bad I think I was not so clear in the question... I need the price to remain on sheet 1 either way, so for example.. if the formula finds a product # on sheet 2 so it should fill in the price on sheet 1 and if it doesn't find the product # on sheet 2 it should leave the price for that product # on sheet one alone without changing anything. Thanks!
            – sender russell
            Nov 9 at 20:24













          up vote
          0
          down vote










          up vote
          0
          down vote









          You want to use INDEX/MATCH for this:



          Put the following formula in column C and populate down
          =IFERROR(IF(INDEX(Sheet2!B:B,MATCH(A2,Sheet2!A:A,0))=Sheet1!B2,B2,INDEX(Sheet2!B:B,MATCH(A2,Sheet2!A:A,0))),"")



          The MATCH will find, the row on Sheet2 with the same Product ID, the INDEX will return the matching price. If it matches the one on Sheet1, the formula returns the value on Sheet1 in column B. If it doesn't it will return the price from Sheet2






          share|improve this answer














          You want to use INDEX/MATCH for this:



          Put the following formula in column C and populate down
          =IFERROR(IF(INDEX(Sheet2!B:B,MATCH(A2,Sheet2!A:A,0))=Sheet1!B2,B2,INDEX(Sheet2!B:B,MATCH(A2,Sheet2!A:A,0))),"")



          The MATCH will find, the row on Sheet2 with the same Product ID, the INDEX will return the matching price. If it matches the one on Sheet1, the formula returns the value on Sheet1 in column B. If it doesn't it will return the price from Sheet2







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 9 at 20:35

























          answered Nov 9 at 20:07









          cybernetic.nomad

          1,9241515




          1,9241515











          • my bad I think I was not so clear in the question... I need the price to remain on sheet 1 either way, so for example.. if the formula finds a product # on sheet 2 so it should fill in the price on sheet 1 and if it doesn't find the product # on sheet 2 it should leave the price for that product # on sheet one alone without changing anything. Thanks!
            – sender russell
            Nov 9 at 20:24

















          • my bad I think I was not so clear in the question... I need the price to remain on sheet 1 either way, so for example.. if the formula finds a product # on sheet 2 so it should fill in the price on sheet 1 and if it doesn't find the product # on sheet 2 it should leave the price for that product # on sheet one alone without changing anything. Thanks!
            – sender russell
            Nov 9 at 20:24
















          my bad I think I was not so clear in the question... I need the price to remain on sheet 1 either way, so for example.. if the formula finds a product # on sheet 2 so it should fill in the price on sheet 1 and if it doesn't find the product # on sheet 2 it should leave the price for that product # on sheet one alone without changing anything. Thanks!
          – sender russell
          Nov 9 at 20:24





          my bad I think I was not so clear in the question... I need the price to remain on sheet 1 either way, so for example.. if the formula finds a product # on sheet 2 so it should fill in the price on sheet 1 and if it doesn't find the product # on sheet 2 it should leave the price for that product # on sheet one alone without changing anything. Thanks!
          – sender russell
          Nov 9 at 20:24


















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53232445%2fexcel-formula-vlookup-issue%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to how show current date and time by default on contact form 7 in WordPress without taking input from user in datetimepicker

          Syphilis

          Darth Vader #20