Forum Discussion

optinlists15's avatar
optinlists15
Copper Contributor
May 03, 2018

Data Matching and Merging

Hello,

I have two worksheets that have one common denominator (which is order #). I want to tell Excel that if the order numbers match on both worksheets, then add the email address from one worksheet to the other. How can I do that?

Thanks!

Robin

3 Replies

  • Matt Mickle's avatar
    Matt Mickle
    Bronze Contributor

    Robin-

     

    Not exactly sure how your data is set up, but maybe something like this will work (See attached Excel File for further reference):

     

    =IFERROR(INDEX('Sheet with Order & Address'!$A$2:$B$13,MATCH(A2,'Sheet with Order & Address'!$A$2:$A$13,0),2),"Order Not Present")

     

    • optinlists15's avatar
      optinlists15
      Copper Contributor

      Thanks Matt! I actually figured it out and used the formula:

      =vlookup(B31:sheet1!$B$2:C$733,2,FALSE)

      Moved all of the email addresses over to the other sheet by matching the order numbers. 

      It has been a while since I have done this process, so thanks for the help!

      • Matt Mickle's avatar
        Matt Mickle
        Bronze Contributor

        Glad you were able to get your issue resolved!  Vlookup() is a very useful function.  Sometimes, if data structure can't be modified you can use Index() Match() which is essentially the same thing.   The difference is that Vlookup() can only look to the right, while an Index() Match() can look left or right.  There are also other performance implications based on which one you use which only really come into play for extremely large workbooks.

Resources