+ Reply to Thread
Results 1 to 4 of 4

A compare formula

Hybrid View

  1. #1
    Registered User
    Join Date
    01-20-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    79

    A compare formula

    Hello, I have an excel file like below.
    SV_plates	Row	Col	IDs	sample
    SVI_01	A	1	1045	010-006P
    SVI_01	B	1	1270	032-006
    SVI_01	C	1	1274	034-014P
    SVI_01	D	1	1276	035-016B
    SVI_01	E	1	1277	038-022
    SVI_01	F	1	1278	045-012
    SVI_01	G	1	1282	047-011P
    I want to add one column which is the value in the first column respectively. The condition is the cell value in 5th column matchs the value in the 4th column.
    For example,
    SVII_31	G	4	3291	1234
    SVI_03	F	10	3965	3291	SVII_31
    3291 matchs , then return "SVII_31" . In the above example, Cell E2 value is "3291", then we search D1:D65536, found D1="3291", then we add A1="SVII_31" to the new column. If not found, then noing added or add "NA" something.

    Thanks for help.
    Attached Files Attached Files
    Last edited by zhshqzyc; 03-17-2011 at 10:35 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    07-17-2005
    Location
    Abergavenny, Wales, UK
    MS-Off Ver
    XL2003, XL2007, XL2010, XL2013, XL2016
    Posts
    608

    Re: A compare formula

    Hi

    With the data you have provide, there are no matches.

    However, I think you may be looking for something like
    =IF(COUNTIF($D$2:$D$383,E34),A34,"")
    --
    Regards
    Roger Govier
    Microsoft Excel MVP

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,333

    Re: A compare formula

    Put this in F2 and pull down.
    =IF(ISERROR(MATCH(E2,$D$1:$D$800,0)),"",INDEX($A$1:$A$800,MATCH(E2,$D$1:$D$800,0)))
    Hey Roger - I got a single match on row 2.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Valued Forum Contributor
    Join Date
    07-17-2005
    Location
    Abergavenny, Wales, UK
    MS-Off Ver
    XL2003, XL2007, XL2010, XL2013, XL2016
    Posts
    608

    Re: A compare formula

    Hi Marvin

    You're quite right. A touch of brain fade on my part - should be gone to bed!!!
    I read the question wrongly, AND posted a stupid solution.

+ 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