+ Reply to Thread
Results 1 to 7 of 7

LOOKUP formula not working right

  1. #1
    Registered User
    Join Date
    01-18-2006
    Posts
    7

    LOOKUP formula not working right

    I'm trying to identify the person with the lowest score in the column. I'm using the formula

    =IF(J16="1",LOOKUP((MIN(J4:J15)),J4:J15,$D$4:$D$15),"")

    Column D represents the names
    Column J represents their score
    cell J16 indicates there was 1 low score

    Sometimes I get the right name and sometimes I get #N/A.

  2. #2
    Bernard Liengme
    Guest

    Re: LOOKUP formula not working right

    Why the quotes around the digit 1? Surely the 1 in J16 is numeric not text
    I tried =IF(J16=1,LOOKUP((MIN(J4:J15)),J4:J15,$D$4:$D$15),"")
    with some dummy data and it worked.

    Also try
    =INDEX($D$4:$D$15,MATCH(MIN(J4:J15),J4:J15,0))
    OR
    =IF(J16=1, ($D$4:$D$15,MATCH(MIN(J4:J15),J4:J15,0)) ,"")
    --
    Bernard V Liengme
    www.stfx.ca/people/bliengme
    remove caps from email

    "pdgaustintexas"
    <[email protected]> wrote in
    message news:[email protected]...
    >
    > I'm trying to identify the person with the lowest score in the column.
    > I'm using the formula
    >
    > =IF(J16="1",LOOKUP((MIN(J4:J15)),J4:J15,$D$4:$D$15),"")
    >
    > Column D represents the names
    > Column J represents their score
    > cell J16 indicates there was 1 low score
    >
    > Sometimes I get the right name and sometimes I get #N/A.
    >
    >
    > --
    > pdgaustintexas
    > ------------------------------------------------------------------------
    > pdgaustintexas's Profile:
    > http://www.excelforum.com/member.php...o&userid=30600
    > View this thread: http://www.excelforum.com/showthread...hreadid=505478
    >




  3. #3
    Bernard Liengme
    Guest

    Re: LOOKUP formula not working right

    Why the quotes around the digit 1? Surely the 1 in J16 is numeric not text
    I tried =IF(J16=1,LOOKUP((MIN(J4:J15)),J4:J15,$D$4:$D$15),"")
    with some dummy data and it worked.

    Also try
    =INDEX($D$4:$D$15,MATCH(MIN(J4:J15),J4:J15,0))
    OR
    =IF(J16=1, ($D$4:$D$15,MATCH(MIN(J4:J15),J4:J15,0)) ,"")
    --
    Bernard V Liengme
    www.stfx.ca/people/bliengme
    remove caps from email

    "pdgaustintexas"
    <[email protected]> wrote in
    message news:[email protected]...
    >
    > I'm trying to identify the person with the lowest score in the column.
    > I'm using the formula
    >
    > =IF(J16="1",LOOKUP((MIN(J4:J15)),J4:J15,$D$4:$D$15),"")
    >
    > Column D represents the names
    > Column J represents their score
    > cell J16 indicates there was 1 low score
    >
    > Sometimes I get the right name and sometimes I get #N/A.
    >
    >
    > --
    > pdgaustintexas
    > ------------------------------------------------------------------------
    > pdgaustintexas's Profile:
    > http://www.excelforum.com/member.php...o&userid=30600
    > View this thread: http://www.excelforum.com/showthread...hreadid=505478
    >




  4. #4
    Registered User
    Join Date
    01-18-2006
    Posts
    7
    Sorry, none of those formulas worked just right.

    The reason for the "1" is that cell J16 has a formula to find the only lowest number =IF(FREQUENCY(J4:J15,(MIN(J4:J15)))=1, "1","")

    Basically what this is is a golf tournament scorecard. I have a list of names per flight. I want to find the lowest score per hole and the player who shot it. 2 or more low scores, the cell is left blank. The formula I'm using only works on a few names, otherwise I get #N/A.

  5. #5
    Bernard Liengme
    Guest

    Re: LOOKUP formula not working right

    That really is not the way FREQUENCY is used. Try
    =IF(COUNTIF(J4:J15,MIN(J4:J15))=1,1,"")
    I do not understand why you have put the 1 in quotes when it is numeric.
    In my answer I mistyped the second formula; it should be
    =IF(J16=1,INDEX($D$4:$D$15,MATCH(MIN(J4:J15),J4:J15,0)),"")


    If you really want text in J16 use
    =IF(COUNTIF(J4:J15,MIN(J4:J15))=1,"1","")
    and
    =IF(J16="1",INDEX($D$4:$D$15,MATCH(MIN(J4:J15),J4:J15,0)),"")

    Both version work for me.
    --
    Bernard V Liengme
    www.stfx.ca/people/bliengme
    remove caps from email

    "pdgaustintexas"
    <[email protected]> wrote in
    message news:[email protected]...
    >
    > Sorry, none of those formulas worked just right.
    >
    > The reason for the "1" is that cell J16 has a formula to find the
    > _only_ lowest number =IF(FREQUENCY(J4:J15,(MIN(J4:J15)))=1, "1","")
    >
    > Basically what this is is a golf tournament scorecard. I have a list
    > of names per flight. I want to find the lowest score per hole and the
    > player who shot it. 2 or more low scores, the cell is left blank. The
    > formula I'm using only works on a few names, otherwise I get #N/A.
    >
    >
    > --
    > pdgaustintexas
    > ------------------------------------------------------------------------
    > pdgaustintexas's Profile:
    > http://www.excelforum.com/member.php...o&userid=30600
    > View this thread: http://www.excelforum.com/showthread...hreadid=505478
    >




  6. #6
    Registered User
    Join Date
    01-18-2006
    Posts
    7

    Thumbs up

    IT WORKS!! Thanks alot!

  7. #7
    Registered User
    Join Date
    01-18-2006
    Posts
    7

    Thumbs up

    IT WORKS!! Thanks alot!

+ 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