+ Reply to Thread
Results 1 to 4 of 4

I want to compare a range with 1 cell

  1. #1
    Registered User
    Join Date
    08-27-2015
    Location
    Schoorl, The Netherlands
    MS-Off Ver
    2021
    Posts
    67

    I want to compare a range with 1 cell

    Hi,

    I have a question. I have a range of random numbers in A2:a30 and I want to create a formule
    in B2 which also has a random number and I want to compare it to the list of numbers to see if there is a match and when
    there is a match it should say win and if there is no match, it should say loss.

    I have the following formula but I don't get it right:
    =ALS(B2=A2:a30;"Win";"Loss")

    What am I doing wrong here since when I do this:
    =ALS(B2=A2;"Win";"Loss")
    I get the right result if the 2 cells match.

    Can someone assist me here?

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: I want to compare a range with 1 cell

    Probably best to use MATCH here:

    Please Login or Register  to view this content.
    WBD
    Office 365 on Windows 11, looking for rep!

  3. #3
    Registered User
    Join Date
    08-27-2015
    Location
    Schoorl, The Netherlands
    MS-Off Ver
    2021
    Posts
    67

    Re: I want to compare a range with 1 cell

    Thanks, it works like a charm!!!

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: I want to compare a range with 1 cell

    here is another option in case you are interested... =IF(COUNTIF(A2:A30;B2)>0;"Win";"Loss")
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

+ 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] Compare two Range Cell
    By ionelz in forum Excel General
    Replies: 2
    Last Post: 09-27-2018, 05:40 PM
  2. Replies: 6
    Last Post: 06-05-2014, 05:02 PM
  3. Replies: 3
    Last Post: 06-22-2012, 06:40 PM
  4. Replies: 6
    Last Post: 05-30-2012, 03:09 PM
  5. compare cell to a range
    By jcoshow in forum Excel General
    Replies: 9
    Last Post: 06-26-2011, 02:35 AM
  6. How to compare a cell to a range.
    By mandy02 in forum Excel General
    Replies: 4
    Last Post: 02-17-2008, 10:21 PM
  7. Way to compare one cell vs a range?
    By Rgaherty in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-02-2007, 02:24 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