+ Reply to Thread
Results 1 to 8 of 8

formula for matching a cell to a range of cells

  1. #1
    Registered User
    Join Date
    08-17-2010
    Location
    nottingham
    MS-Off Ver
    Excel 2000
    Posts
    3

    formula for matching a cell to a range of cells

    Hi All,

    im in need of some help before I pull all my hair out.

    im using excel 2000 and am trying to do the following.

    I would like to create a formula that checks to see if the value is cell H3 is also in cell range A9:F500, and then again for H4, H5, H6, H7 and H8 and then if they are all there have "winner" in cell H1.

    I have tried several combination of if and or statements but I cant seem to get them to work on the range of cells only on indivual cells which isnt much good.

    Thanks
    Adie
    Last edited by adiefallguy; 08-17-2010 at 11:30 AM.

  2. #2
    Registered User
    Join Date
    08-17-2010
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: formula help

    Hi,

    There are I'm sure multiple ways to do this, but maybe you could try putting this formula in H1.

    =IF(AND(COUNTIF($A$9:$F$500,H3)>=1,COUNTIF($A$9:$F$500,H4)>=1,COUNTIF($A$9:$F$500,H5)>=1,COUNTIF($A$9:$F$500,H6)>=1,COUNTIF($A$9:$F$500,H7)>=1),"winner","not winner")

  3. #3
    Registered User
    Join Date
    04-29-2010
    Location
    McLean, VA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    87

    Re: formula for matching a cell to a range of cells

    I had a formula that needed revising. The correct addition is attached.
    Attached Files Attached Files
    Last edited by The Exceller; 08-17-2010 at 11:36 AM. Reason: new attachment
    The Exceller
    If I helped you, please add to my reputation by clicking on the scale by my name in this post.

  4. #4
    Registered User
    Join Date
    08-17-2010
    Location
    nottingham
    MS-Off Ver
    Excel 2000
    Posts
    3

    Re: formula for matching a cell to a range of cells

    thanks for the quick response there but im getting an invalid link error on the attachment

  5. #5
    Registered User
    Join Date
    04-29-2010
    Location
    McLean, VA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    87

    Re: formula for matching a cell to a range of cells

    Try this attachemnt. Should work.

    If not, here's what I've done:

    Starting in cell J3 and going down to J8 type the following:

    J3 =COUNTIF($A$9:$F$500,H3)
    J4 =COUNTIF($A$9:$F$500,H4)
    J5 =COUNTIF($A$9:$F$500,H5)
    J6 =COUNTIF($A$9:$F$500,H6)
    J7 =COUNTIF($A$9:$F$500,H7)
    J8 =COUNTIF($A$9:$F$500,H8)

    Then in cell H1 type:

    =IF(SUM(J3:J8)>=6,"winner","loser")
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-17-2010
    Location
    nottingham
    MS-Off Ver
    Excel 2000
    Posts
    3

    Re: formula for matching a cell to a range of cells

    thanks so much mrsgkl, that works a treat

  7. #7
    Registered User
    Join Date
    04-29-2010
    Location
    McLean, VA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    87

    Re: formula for matching a cell to a range of cells

    MrsGLK's formula works as well once you type it in cell H1. She just forgot to include cell H8 which is included below.

    Glad we could help you out!


    =IF(AND(COUNTIF($A$9:$F$500,H3)>=1,COUNTIF($A$9:$F$500,H4)>=1,COUNTIF($A$9:$F$500,H5)>=1,COUNTIF($A$9:$F$500,H6)>=1,COUNTIF($A$9:$F$500,H7)>=1,COUNTIF($A$9:$F$500,H8)>=1),"winner","not winner")

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: formula for matching a cell to a range of cells

    Another way, with the formula confirmed via Ctrl+Shift+Enter:

    =IF(PRODUCT(COUNTIF(A9:F500, H3:H8)), "winner", "")
    Entia non sunt multiplicanda sine necessitate

+ 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