+ Reply to Thread
Results 1 to 3 of 3

Is the input value from list A or B?

  1. #1
    Registered User
    Join Date
    04-24-2012
    Location
    LA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Is the input value from list A or B?

    Hello everyone. I'm new to excel and to this forum and I hope someone can help me with the right formula
    I have these to lists, A & B.

    A B
    1010 1012
    5340 1330
    6411 5470
    8888 8451
    9003
    9577
    -------------------------------------

    I need to input a value below. The formula I need will search the two lists above and tells me in which list the value is. It will return "A" or "B". and if I input a number that's not in either list the cell stays blank. It would stay blank if there is no input value as well.

    input List
    1012 B
    8888 A
    (empty) (empty)
    7777 (empty)

    Can anyone help please

  2. #2
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Is the input value from list A or B? can anyone help

    =if(ref="","",IF(COUNTIF(A:B,ref)=0,"",IF(COUNTIF(A:A,ref),"A","B")))

    Change the ref to a cell reference that holds the value
    You can also add row references to limit the search to your specific range - COUNTIF(A2:B100,ref) & COUNTIF(A2:A100,ref)
    Change the column references to your actual range, too.
    Last edited by Cutter; 04-24-2012 at 08:34 PM. Reason: Added additional info

  3. #3
    Registered User
    Join Date
    04-24-2012
    Location
    LA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Thumbs up Re: Is the input value from list A or B? can anyone help

    I didn't expect a reply so fast.

    Thank you Cutter

    and YES

    It worked perfectly

    appreciate your help ))

+ 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