+ Reply to Thread
Results 1 to 1 of 1

how to combine hlookup with IF to match values from different sheets

  1. #1
    Forum Contributor
    Join Date
    04-09-2013
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    176

    how to combine hlookup with IF to match values from different sheets

    hi to all,
    i have data like this sheet4
    data have
    Sample AB966 AB1609 AB1610 AB1611 AB1612 AB1613 AB1614
    1 AA -- AA CC AA -- --
    2 AC -- AA CC AA -- --
    3 CC -- AA CC AA -- --
    4 -- -- TT CC AA -- --
    5 ZZ -- AA CC AA -- --
    and data in sheet2
    AB966 AB1609 AB1610 AB1611 AB1612 AB1613 AB1614
    A AA -- AA CC AA -- --
    B CC -- TT CC AA -- --

    I want to replace in this sample 1 status (B3 in sheet4) for AB966 to A if it match to AB966 (B2 cell value in sheet2), replace to B if it match to AB966 ( B3 cell value in sheet2), IF B3 contains any mixed letters like AC then I would like to give H.
    I would like to give -- for sample status (B3 in sheet4) if sample 1 contains any one of this letters ZZ or -- (in B2 in sheet4).
    Now I am using combination of IF and Hlookup formula to solve this problem and it is working perfectly for AB966 and not working for others like AB1609 etc.
    I am using this formula this, =IF(B3=HLOOKUP($I$2,Sheet2!$B$1:$AX$3,2,FALSE),"A",IF(B3=HLOOKUP($I$2,Sheet2!$B$1:$AX$3,3,FALSE),"B", IF(B3="ZZ","--",IF(B3="--","--","H"))))
    now i want to drag this formula from AB966 to AB1614.

    Expected results

    AB966 AB1609 SX1610 SX1611 SX1612 SX1613 SX1614
    A
    H
    B
    --
    --
    Can anyone help to solve this problem and i am attching sample worksheet and it will help understand better than my explanation.
    any help would be highly appreciated
    Thanks,
    Genetist
    Attached Files Attached Files
    Last edited by genetist; 02-19-2014 at 10:23 AM. Reason: for clear title

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Match Value in Sheet 1 with Sheet 2, copy entire row from sheet 1 to new sheet
    By lzyshaman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-01-2013, 07:48 AM
  2. look up on sheet 1 match data sheet 2 and fill in cell on first sheet
    By treborharris in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-28-2013, 01:01 PM
  3. [SOLVED] Lookup up from Sheet 1 in Sheet 2 and display additional value in Sheet 1 when match
    By azbridgie in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-31-2013, 03:22 PM
  4. If condition is met in sheet 2, take information from sheet 1 and post into sheet 3?
    By kyleplaysgolf in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-11-2012, 06:32 PM
  5. Replies: 11
    Last Post: 10-14-2012, 01:03 PM

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