Poll: which is the correct answer

+ Reply to Thread
Results 1 to 26 of 26

correct answer to a thread

  1. #1
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    correct answer to a thread

    ok so op posts a question
    how to nest if?
    in excel 2007 i have integers from 1 to 4 in cell a1 and want to return 1=a 2=b 3=c 4=d and over 4 "out of range"
    i have so far =if(a1=1,"a",(IF(a1=2,"b")),if((IF(a1=3,"c")),(IF(a1=4,"d")),"out of range")) but i get an error message of to many arguements
    how do i fix it?
    several replies later he has been given these answers
    1
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    2
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    3
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    4
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    5
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    6
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and maybe a few more

    so which is the correct answer?
    Last edited by martindwilson; 07-27-2013 at 01:16 PM. Reason: title chang
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,103

    Re: correct answer

    As always, it's not question when they return correct answer (probably all of them). It's more about what to get if someone enter <1 number or for example character...
    Never use Merged Cells in Excel

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: correct answer to a thread

    ah thats where i disagree ,you see too many threads where the ops original question is not answered and people just assume they want one that works
    the only correct answer from those is
    =IF(A1=1,"a",IF(A1=2,"b",IF(A1=3,"c",IF(A1=4,"d","out of range"))))
    the rest are alternative methods to achieve the same results
    the question was about nesting IF not about how to convert 1 to A. valid to post the others as suggestions tho

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,103

    Re: correct answer to a thread

    Sometimes op ask for 'nesting IF's' for example, because he doesn't know other approach.
    Doesn't mean that is best approach, thou.

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: correct answer to a thread

    no it means you haven't read the question properly
    but i get an error message of to many arguments
    how do i fix it?
    how do we know this isn't just a simplified version of something else?. imo we should always answer the question as posted if possible and then suggest alternatives not just leap in with some flashy function.
    like
    well you nest ifs in this fashion

    =IF(A1=1,"a",IF(A1=2,"b",IF(A1=3,"c",IF(A1=4,"d","out of range"))))
    but shorter alternative to this could be

    =IFERROR(CHOOSE(A1,"a","b","c","d"),"out of range")

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,051

    Re: correct answer to a thread

    Martin, you neglected to add if those other suggestions were presented as alternatives, or as a "use this" reply?

    Fundamentally, I agree with you, the question was "fix my nested IF's" and formula 1 does exactly that. If the others were suggested as alternatives, thats great too. I sometimes offer alternatives to what the OP wants, merely as a way of showing other (maybe better?) options (and maybe a bit of training)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,103

    Re: correct answer to a thread

    When someone ask for question (and I've seen them) that solution is VLOOKUP function, and he ask for 10 IF functions you will write 10 IF's as solution and offer VLOOKUP or point him to VLOOKUP right away?

    I would go for 2nd way... But yes, sometimes I (or we) overmake our solutions. (If there is a word overmake :D )

  8. #8
    Forum Contributor
    Join Date
    03-14-2012
    Location
    location
    MS-Off Ver
    Excel 2007
    Posts
    170

    Re: correct answer to a thread

    Quote Originally Posted by FDibbins View Post
    ...Fundamentally, I agree with you, the question was "fix my nested IF's" and formula 1 does exactly that. If the others were suggested as alternatives, thats great too. I sometimes offer alternatives to what the OP wants, merely as a way of showing other (maybe better?) options (and maybe a bit of training)
    I really appreciate other solutions offered, as a newbie... just to learn!
    blue

  9. #9
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: correct answer to a thread

    now thats a different question now if as you say someone tries to nest umpteen ifs when a vlookup or similar is the fix then by all means suggest it and i agree that posting a 20 nested if statement would be silly.
    fd it was just an example nothing to stop that it should be encouraged, but i feel the original q should be answered by the first reply or even ask if that's what's really desired not just blindly post some try this array formula type of answer.
    try another
    how do i get over the 7 ifs limitation in excel 2003?
    now i don't know why someone wouldn't use a vlookup but it is doable so my answer would show that
    i
    Last edited by martindwilson; 07-27-2013 at 05:08 PM.

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,051

    Re: correct answer to a thread

    Blue, I have seen quite a few times when an alternative is suggested (by me or others) that the OP comes back with comments ranging from...oh wow, I didnt know you could do that...to...ummm duh, why didnt I think of that...

    @Martin, yes I figured it was just an example, and as I said, I fundamentally agree with you - answer the question 1st - then suggest options
    Last edited by FDibbins; 07-27-2013 at 05:11 PM.

  11. #11
    Forum Contributor
    Join Date
    03-14-2012
    Location
    location
    MS-Off Ver
    Excel 2007
    Posts
    170

    Re: correct answer to a thread

    FD, yeah...or never offers a feedback or comes back! k, I do not want to talk too much off topic! Thanks and I am sorry!

  12. #12
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,103

    Re: correct answer to a thread

    Right, but also I always ask myself: What if he want to extend to 5 more numbers? What if, as I mention b4, somebody put letter in A1? etc....
    I still think that buletproof solution is better than just fixing IF.
    If it can keep it simple, as you gave other solutions.

    I'll keep in mind this when I'll answer once some similliar question with multiple approaches.
    And I don't like IF's

  13. #13
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: correct answer to a thread

    talk of topic as much as you want,this is just a discussion i'm not fussed.
    i suppose i just get peeved when a). i answer the question as posted then b)20 posts later someone pops in an answer that i knew from the start was an alternative
    and the op completely ignores or acknowledges that their original q was answered in post#2
    i hate ifs too lets not answer any post that has an outside chance of using IF anywhere in it
    Last edited by martindwilson; 07-27-2013 at 05:45 PM.

  14. #14
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,051

    Re: correct answer to a thread

    =IF("only it was that easy","use vlookup","use another if")

  15. #15
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: correct answer to a thread

    answering a question and providing a solution are occasionally the same thing; which is better will always be a topic of discussion ;-)
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  16. #16
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: correct answer to a thread

    well here's a typical example it just happened
    while i;m typing up an answer BANG a formula given but no advice!
    http://www.excelforum.com/excel-form...25#post3341225

  17. #17
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,051

    Re: correct answer to a thread

    pretty typical there though, Martin

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

    Re: correct answer to a thread

    I never answer the question posted if I suspect the OP's own question is misleading them. I presume they simply are unaware of the myriad other tools available to them, once i understand as much as possible of what they're trying to calculate, I offer the best formula I can to accomplish that, regardless of how far that is from their originally phrased question.

    Common:

    1) Massive Nested IF replaced by easier to read/maintain lookup formula.
    2) Introduction of whole new functions they were previously unaware of... possibly version-centric.
    3) VBA questions frequently given a simple formula answer instead
    4) Formula questions frequently lead to OP being introduced to VBA.


    For me the goal is of greater importance than the question.
    _________________
    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!)

  19. #19
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,051

    Re: correct answer to a thread

    I think to Martin's point though, Jerry, Im sure you would not just, out of the blue, offer something completely different (giving then the results they want) without 1st explaining - even briefly - that you suggestion is a possibly simpler alternative for them to consider?

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

    Re: correct answer to a thread

    Honestly, I have done that on many occasions.

    "Ok, try this instead, see if it gives you the results you want:

    =somefunnyformula
    "



    Possible responses of have ranged from "Wow, that's so much easier...", "Never thought of that", "Can you explain how that works", "Thanks, that does the trick"....

    It is pretty rare that an OP insists on their original approach.

  21. #21
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,051

    Re: correct answer to a thread

    yes, but you *did* say..."try this instead", not just =somefunnyformula

  22. #22
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: correct answer to a thread

    @MD

    Language nor communication is digital.
    Phrasing a question is 1, phrasing an intention is 2, bearing in mind that for many OP's English/American is not their native language is 3.
    Reading language only digitally is neglecting the essence of language/communication.

    So:

    =CHAR(MIN(B15,5)+96)



  23. #23
    Valued Forum Contributor
    Join Date
    08-22-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2019
    Posts
    716

    Re: correct answer to a thread

    When I ask a question, I like to see a fix (if it's fixable) for the actual question I asked & I love it when someone shows a different way of doing the same thing as well. That way I learn.

  24. #24
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,942

    Re: correct answer to a thread

    There are many occasions when I have simply made the formula or code work, without trying to enhance, replace or substitute it. And sometimes, someone else comes along with an/the alternative.

    Other times I have offered alternatives ... Mostly if I don't think the original is practical or viable.

    And sometimes I do both. Kind of depends how much time I have, how easy it is to offer alternatives, how interesting the problem is ... and if the OP has provided a sample workbook to test the options.

    Was that the correct answer to the thread?
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  25. #25
    Forum Contributor
    Join Date
    03-14-2012
    Location
    location
    MS-Off Ver
    Excel 2007
    Posts
    170

    Re: correct answer to a thread

    In my opinion, definitely, yes!
    I like to see alternatives, I can see other vision, I can choose...if I can make the difference between them. One solution can be better than other, or uses many resources, or takes too much time even if the result is the same!
    But I think, it's just a thought, the key is in the OP's hand, he/she must say "Thank you" to all.
    are there too many variables? lol

  26. #26
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: correct answer to a thread

    Kind of depends how much time I have
    i suppose that has to be considered!

+ 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] How to add points when the answer is correct?
    By jkskates in forum Excel General
    Replies: 3
    Last Post: 10-31-2012, 09:21 PM
  2. Formula not returning correct answer
    By rschase1863 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-07-2011, 11:06 PM
  3. Function not getting the correct answer
    By baseball9 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-18-2008, 10:17 AM
  4. when i input (=r3*s3) the answer is not correct?
    By Dianna in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-09-2006, 06:30 PM
  5. Formula correct, answer wrong
    By TJAC in forum Excel General
    Replies: 2
    Last Post: 01-03-2006, 02:20 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