+ Reply to Thread
Results 1 to 2 of 2

How to compare two pair columns and insert value from another column

Hybrid View

  1. #1
    Registered User
    Join Date
    11-09-2008
    Location
    NC
    Posts
    13

    How to compare two pair columns and insert value from another column

    Hi all,

    I am arranging some data and have a question that is puzzling me.

    First, I have a pair of latitude and longitude located in cell M2 and N2 respectively.
    Second, I have the whole list of pairs of coordinates for all locations in column R and S.
    Third, I have unique code for each location in column P. For example, the pair of coordinates in R4 and S4 correspond to the unique id in P4.

    My task is to find the one pair of coordinates in R and S that matches up with M2 and N2. After that, I need to paste the corresponding unique id in P onto cell O2.

    For example, if R421 and S421 matches up with M2 and N2, I will then paste P421 onto O2.

    Some websites suggested using vlookup but I wasn't able to use this command to compare two columns simultaneously.

    Any suggestions are welcome! Thanks!

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: How to compare two pair columns and insert value from another column

    Hi

    Try this. Expand the ranges to suit.

    =INDEX(P:P,SUMPRODUCT(--(R2:R6=M2),--(S2:S6=N2),ROW(R2:R6)))
    rylo

+ 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