+ Reply to Thread
Results 1 to 26 of 26

having problems with If formula

  1. #1
    Forum Contributor
    Join Date
    03-19-2009
    Location
    Nambucca Heads NSW
    MS-Off Ver
    Excel 2007
    Posts
    125

    having problems with If formula

    i have been working on a track and field excel program and need help
    i have a formula on AG8 to BG34 i have included the file
    i have in E8 14.1 seconds i need it to say 1 in AG8,
    in E10 it says 15.1 seconds in AG10 it should say 1
    in E12 it says 13.0 seconds in AG8 it should say 3
    in E19 it say 13.0 second in AG19 it should say 2 as it equal the best time
    not all cells in column E are used like all the columns up to AC

    i hope this has made sense

    i would appreciate some help for this as its for an track and field club for kids
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: having problems with If formula

    Are you just trying to do a ranking? Or are you trying to slot all values in AI with 1 (best time) or 3 (not best time) and a 2 (tied for best time?)?
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: having problems with If formula

    If it's a unique ranking you're after, this formula in AI8 copied down and over will accomplish that:
    =IF(E8="","",RANK(E8,E$8:E$35)+(COUNTIF(E$8:E8,E8)-1))

    If not, more detail would help.

  4. #4
    Forum Contributor
    Join Date
    03-19-2009
    Location
    Nambucca Heads NSW
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: having problems with If formula

    thank you JBeaucaire
    it is not ranking and 1 is the slowest time and 3 is the quickest time and 2 is equal to the quickest time
    the athlete gets points doing their event

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: having problems with If formula

    Try this in AI8 and copy down and over:
    =IF(E8="","",IF(E8=MIN(E$8:E$35),IF(MAX(AI$6:AI6)<3,3,2),IF(E8=MAX(E$8:$E$35),1,"")))

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: having problems with If formula

    This little variation removes one IF statement and still works - just for fun..again in AI8 and copied around:

    =IF(E8="","",IF(E8=MIN(E$8:E$35),(MAX(AI$6:AI6)<3)+2,IF(E8=MAX(E$8:$E$35),1,"")))

  7. #7
    Forum Contributor
    Join Date
    03-19-2009
    Location
    Nambucca Heads NSW
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: having problems with If formula

    Thanks JBeaucaire

    it is working but after i put 4 or more times in the top numbers are deleted

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: having problems with If formula

    It's not doing that for me, I can fill in an entire column and it gives me one 1, one 3, and as many 2s as are appropriate.

  9. #9
    Forum Contributor
    Join Date
    03-19-2009
    Location
    Nambucca Heads NSW
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: having problems with If formula

    maybe I am having trouble cause i am using excel 2007
    i have tried all of your formulas

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: having problems with If formula

    There's nothing Excel 2007ish about this issue.

    Go ahead and put in your data and the formula so I can see it "not working", post it up again. I'm sure something simple is different.

  11. #11
    Forum Contributor
    Join Date
    03-19-2009
    Location
    Nambucca Heads NSW
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: having problems with If formula

    i have put the new formula in and have attached it
    Attached Files Attached Files

  12. #12
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: having problems with If formula

    Working well it seems. Not a lot of data there, but what little you put in looks great.

  13. #13
    Forum Contributor
    Join Date
    03-19-2009
    Location
    Nambucca Heads NSW
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: having problems with If formula

    hi i have tried it on another computer with excel 2003 on a fresh sheet and it still gives me the same thing i don't know what is wrong

  14. #14
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: having problems with If formula

    Neither do I. I don't even know what problem you're trying to solve. The sheet you posted appears to be working fine. There is one value of 1, one value of 3, and all other scores that match the high score get a 2. I don't see anything broken.

    Is there even enough data here to demonstrate the problem you're having? It's not clear where/what is wrong.

  15. #15
    Forum Contributor
    Join Date
    03-19-2009
    Location
    Nambucca Heads NSW
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: having problems with If formula

    i will put more times and distances in the sheet for you to see i will do it later in week

  16. #16
    Forum Contributor
    Join Date
    03-19-2009
    Location
    Nambucca Heads NSW
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: having problems with If formula

    i have put the correct answers in, help is needed on page 2-1 manually
    and this what i get with formula in, help is needed on page 2-2
    cells beside dates are random used
    Attached Files Attached Files

  17. #17
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: having problems with If formula

    Dude, this results page bears no resemblance to what you've asked for previously.

    You asked for a single value of 1 for the lowest time, a single value of 3 for the highest, and any values that MATCH the highest score get a score of 2 added.

    Yours is doing something completely different. I really wish you had started here...we seem to have wasted a bit of time.

    Take the values in the 50m dash and explain the logic you used on those scores, maybe I'll get it this time.

  18. #18
    Forum Contributor
    Join Date
    03-19-2009
    Location
    Nambucca Heads NSW
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: having problems with If formula

    i hope this makes sense

    at the begining of the season when they first do an event they get 1 point

    next time they do that event if they better the time they get 3 points
    but if they equall it they get 2 points
    but if they don't do a better time they only get 1 point
    its a point scoring list
    Last edited by Duckie; 04-11-2009 at 04:37 AM.

  19. #19
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: having problems with If formula

    Yep, completely different...and much simpler for some reason. Here you go. There is a different formula in row 8 than row 9+, so don't mix those up.

    Also, your manual math varied in spots from the criteria, I highlighted the differences, there's some way off in column BG, too.

    AG8:
    =IF(C8="","",1)

    AG9:
    =IF(C9="","",IF(COUNT(C$8:C8)=0,1,IF(C9<MIN(C$8:C8),3,IF(C9=MIN(C$8:C8),2,1))))
    Attached Files Attached Files

  20. #20
    Forum Contributor
    Join Date
    03-19-2009
    Location
    Nambucca Heads NSW
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: having problems with If formula

    you are a god me a dummy
    as i still have a problem with the field events as as i type in for HJ 1.50 and lower down i type in 1.53 all i get is 1 which should be 3 as the time in track is higher time to lower and field is lower to higher

  21. #21
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: having problems with If formula

    Well, now you know what you have to do, mark it up, post it up, make sure there's enough data to completely show what you're talking about and ALL the columns in question.

  22. #22
    Forum Contributor
    Join Date
    03-19-2009
    Location
    Nambucca Heads NSW
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: having problems with If formula

    HI
    I put the distances in i have try to change the formula where it says 1 to a 3 and 3 to a 1 but it doesn't work i have highlighted the area where the problem is as it isthe largest measurement that should get 3 at present it only gets 1
    Attached Files Attached Files

  23. #23
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: having problems with If formula

    The formula in BA9 down and over for the FIELD section is:

    =IF(W9="","",IF(COUNT(W$8:W8)=0,1,IF(W9>MAX(W$8:W8),3,IF(W9=MAX(W$8:W8),2,1))))

    This is basically the opposite, using MAX functions instead of MIN.
    Attached Files Attached Files
    Last edited by JBeaucaire; 04-13-2009 at 06:01 PM.

  24. #24
    Forum Contributor
    Join Date
    03-19-2009
    Location
    Nambucca Heads NSW
    MS-Off Ver
    Excel 2007
    Posts
    125

    Thumbs up Re: having problems with If formula

    thank you very much sorry for all the mucking around it works
    Last edited by Duckie; 04-14-2009 at 02:15 AM.

  25. #25
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: having problems with If formula

    If that takes care of your need, be sure to EDIT your original post (Go Advanced) and mark the PREFIX box [SOLVED]

  26. #26
    Forum Contributor
    Join Date
    03-19-2009
    Location
    Nambucca Heads NSW
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: having problems with If formula

    it won't let me mark this as SOLVED

+ 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