+ Reply to Thread
Results 1 to 20 of 20

AGE Band Cal needed help am wasting too much time trying to sort myself !

  1. #1
    Registered User
    Join Date
    05-11-2012
    Location
    Berkshire
    MS-Off Ver
    Excel 2007
    Posts
    4

    AGE Band Cal needed help am wasting too much time trying to sort myself !

    Hi all you helpful people!

    Can anyone give me a formula to sort ages into the following bands please;

    0-17, 18-64, 65-74, 75-84, 85+

    Have loads of data and can get 3 to work but not 5 !

    waiting patiently !

    Thanks for your help in advance

  2. #2
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: AGE Band Cal needed help am wasting too much time trying to sort myself !

    Hi
    Could you upload small worksheet with arrangement of your data and expected results?
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  3. #3
    Registered User
    Join Date
    05-11-2012
    Location
    Berkshire
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: AGE Band Cal needed help am wasting too much time trying to sort myself !

    Current Required output for each row

    Age age band

    62 18-64
    78 75-84
    48 18-64
    69 65-74
    85 85+
    Last edited by Help999; 05-11-2012 at 06:34 AM. Reason: clarity

  4. #4
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: AGE Band Cal needed help am wasting too much time trying to sort myself !

    Sorry I still do not follow your problem Could You made excel sample with before and after results?

  5. #5
    Forum Contributor Russell Dawson's Avatar
    Join Date
    03-01-2012
    Location
    Yorkshire, England
    MS-Off Ver
    2007
    Posts
    608

    Re: AGE Band Cal needed help am wasting too much time trying to sort myself !

    Help999 - it is obviously too much trouble and you would be "wasting too much time" to explain your problem fully so why do you expect others to drag it out of you? I'm sure you will have read the rules but just in case you missed this part here is an extract.

    "Ensure your question is not too vague. Don't assume anyone is familiar with your problem. While you can upload small attachments, describe your problem in the body of the post. We are fortunate to have several Excel gurus, but few mind-readers".
    If I helped, please don't forget to add to my reputation. (click on the star below the post)

    If the problem is solved, please: Select Thread Tools (on top of your 1st post) -> Mark this thread as Solved.

    Failure is not falling down but refusing to get up.

  6. #6
    Registered User
    Join Date
    05-11-2012
    Location
    Berkshire
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: AGE Band Cal needed help am wasting too much time trying to sort myself !

    Sorry all I wanted was a bit of quick help, shall unsubscribe now if it caused a problem

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: AGE Band Cal needed help am wasting too much time trying to sort myself !

    If you need quick help, you need to help others help you. By providing a sample workbook and explaining your question well, you would have received the best of help in the least of time.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  8. #8
    Forum Contributor Russell Dawson's Avatar
    Join Date
    03-01-2012
    Location
    Yorkshire, England
    MS-Off Ver
    2007
    Posts
    608

    Re: AGE Band Cal needed help am wasting too much time trying to sort myself !

    I have found an almost identical request and the answer from a posting in 2008 by searching the internet with the same question that was posted. Oddly enough the solution was from this forum.

    http://www.excelforum.com/excel-gene...d-formula.html

    OP should be able to make necessary adjustments to suit without wasting too much time.

    Posted this despite the unsubscribe threat/promise to enable others to resolve the same question.

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: AGE Band Cal needed help am wasting too much time trying to sort myself !

    I think you guys unnecessarily jumped on the OP on this. The question was not vague and the sample set was good. I am not sure why you badgered the new OP, especially coming from a Moderator!
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  10. #10
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: AGE Band Cal needed help am wasting too much time trying to sort myself !

    NBVC, i only pitched in at the end. Didnt intend to drive him away.

  11. #11
    Forum Contributor Russell Dawson's Avatar
    Join Date
    03-01-2012
    Location
    Yorkshire, England
    MS-Off Ver
    2007
    Posts
    608

    Re: AGE Band Cal needed help am wasting too much time trying to sort myself !

    It was me - Arlette was pouring oil on troubled waters. They were asked twice for a workbook. Anyway, I gave the solution. Tomorrow I will get out of the other side of the bed!

  12. #12
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: AGE Band Cal needed help am wasting too much time trying to sort myself !

    Not everything needs a sample workbook! We get to used to seeing sample workbooks here that we don't even bother to try to read the question clearly first to see if it can be solved without necessarily seeing a sample workbook.

    Sample workbooks are required sometimes, when the issue is truly unclear... but not always!

  13. #13
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: AGE Band Cal needed help am wasting too much time trying to sort myself !

    ....Or, if our English are not enough to understand what OP, asked for...!
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  14. #14
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: AGE Band Cal needed help am wasting too much time trying to sort myself !

    Maybe you're right, Fotis

  15. #15
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: AGE Band Cal needed help am wasting too much time trying to sort myself !

    Wouldn't it have been simple to just offer:

    =IF(A2<18,"0-17",IF(A2<65,"18-64",IF(A2<75,"65-74",IF(A2<85,"75-84","85+")))) or the LOOKUP() alternative

    and let the OP accept it or provide clarification?

  16. #16
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: AGE Band Cal needed help am wasting too much time trying to sort myself !

    Since this thread has gone somewhere in a hand basket I have to ask Cutter: How does your solution work? When I look at it you have a whole lot of <'s and yet every number I type in is put into the proper range. How does your formula know that: A2 that is less than 18 doesn't go into the 75-84 range when that statement says As is less than 85, which could be any number. Blacsh, sheet side formulae makes my eyes water, and your solution isn't even as crazy as some of the schtick I have seen pop up here in the last couple of years.
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

  17. #17
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: AGE Band Cal needed help am wasting too much time trying to sort myself !

    With the nested IF's, the formula "stops" evaluating after the first TRUE it encounters... and only goes to the end if no TRUEs for found on the way...

  18. #18
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: AGE Band Cal needed help am wasting too much time trying to sort myself !

    I haven't been on the forum today, but I do this sort of thing all of the time (the joys of market research data).

    Anyway, I use:

    =CHOOSE(MATCH(A1,{0,18,65,75,85},1),"0-17","18-64","65-74","75-84","85+")

  19. #19
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: AGE Band Cal needed help am wasting too much time trying to sort myself !

    Mordred, use the Formula Evaluation tool and you will see. The short answer is that the IF function is a branch in logic. IF this, then that, else the other. If the condition is true, it doesn't even look at the Else side of thigs. So, because of the way Cutter sorted the possible results, you cannot have a number that is less than 18 that reaches the test to see if it is less than 84.

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

    Re: AGE Band Cal needed help am wasting too much time trying to sort myself !

    because the IF tests stop as soon as one of them is met. (that's why you have to test the lowest band first)
    daddylonglegs' lookup formula seems easiest to me
    Josie

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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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