+ Reply to Thread
Results 1 to 17 of 17

Choose function

  1. #1
    Forum Contributor
    Join Date
    02-20-2009
    Location
    bristol
    MS-Off Ver
    Excel 2003
    Posts
    882

    Choose function

    Hi Guys

    Can anyone please explain me the following line? What will it return and why?
    Please Login or Register  to view this content.

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

    Re: Choose function

    well the choose bit will return the addition required to give the next working day ignoring sat and sun
    "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

  3. #3
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Choose function

    Please Login or Register  to view this content.
    Gives you todays date

    Please Login or Register  to view this content.
    gives you a number 1-7 for the day of the week with Sunday being 1, Saturday 7

    The choose function:
    Please Login or Register  to view this content.
    So
    Please Login or Register  to view this content.
    will pick from the list of numbers, the one with the position that corresponds to the current weekday number.

    So Sunday - Thursday gives 1, Friday gives 3, Saturday gives 2.

    Dateadd("d",A,B)

    will add A days to the date in B.

    i.e. the formula gives you the next working day, which is a bit redundant, as you can just use:
    worksheetfunction.workday(date,1)
    instead!

  4. #4
    Forum Contributor
    Join Date
    02-20-2009
    Location
    bristol
    MS-Off Ver
    Excel 2003
    Posts
    882

    Re: Choose function

    Thanks but if we want to ignore bank holidays as well then how to modify it?

  5. #5
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Choose function

    With the workday function you can add a third argument with a list of holidays to skip as well.

  6. #6
    Forum Contributor
    Join Date
    02-20-2009
    Location
    bristol
    MS-Off Ver
    Excel 2003
    Posts
    882

    Re: Choose function

    Can you please tell me how can use Workday function and how to list the bank holidays ?
    Mnay Thanks for your help so far.

  7. #7
    Forum Contributor
    Join Date
    02-20-2009
    Location
    bristol
    MS-Off Ver
    Excel 2003
    Posts
    882

    Re: Choose function

    Please see attached the bank holidays list for 2014 and 2015.. Thanks
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Choose function

    in your example, you would use:
    =WORKDAY(TODAY(),1,B2:B17

  9. #9
    Forum Contributor
    Join Date
    02-20-2009
    Location
    bristol
    MS-Off Ver
    Excel 2003
    Posts
    882

    Re: Choose function

    Ok but how to exclude weekends like in choose function??

  10. #10
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,997

    Re: Choose function

    The clue is in the function name.
    Everyone who confuses correlation and causation ends up dead.

  11. #11
    Forum Contributor
    Join Date
    02-20-2009
    Location
    bristol
    MS-Off Ver
    Excel 2003
    Posts
    882

    Re: Choose function

    ok. but it gives me error function not defined.

  12. #12
    Forum Contributor
    Join Date
    02-20-2009
    Location
    bristol
    MS-Off Ver
    Excel 2003
    Posts
    882

    Re: Choose function

    so basically i want to find the next working days excluding weekends and bank holidays .. how this can be done?

  13. #13
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,997

    Re: Choose function

    If you are using 2003 you need the Analysis Toolpak installed.

  14. #14
    Forum Contributor
    Join Date
    02-20-2009
    Location
    bristol
    MS-Off Ver
    Excel 2003
    Posts
    882

    Re: Choose function

    Its already installed .. so now what shall i do?

  15. #15
    Forum Contributor
    Join Date
    02-20-2009
    Location
    bristol
    MS-Off Ver
    Excel 2003
    Posts
    882

    Re: Choose function

    I have added the reference atpvbaen.xls and now it gives me Type mismatcch error at msgbox j..
    Please Login or Register  to view this content.

  16. #16
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,997

    Re: Choose function

    The last parameter needs to be a range object, not the address of a range.

  17. #17
    Forum Contributor
    Join Date
    02-20-2009
    Location
    bristol
    MS-Off Ver
    Excel 2003
    Posts
    882

    Re: Choose function

    Yes its been done. Many Thanks

+ 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] CHOOSE Function (Automatic) - Automatic Choose Array
    By dluhut in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-13-2013, 03:22 PM
  2. Choose function
    By bluenight in forum Excel General
    Replies: 6
    Last Post: 11-20-2009, 01:37 PM
  3. Choose function
    By theshark43 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-02-2009, 11:48 AM
  4. Choose Function
    By Gos-C in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-30-2007, 08:52 PM
  5. Choose Function
    By UD 9 in forum Excel General
    Replies: 1
    Last Post: 11-25-2005, 05:25 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