+ Reply to Thread
Results 1 to 10 of 10

Displaying a range of business dates in one cell

  1. #1
    Registered User
    Join Date
    12-16-2014
    Location
    San Diego, CA
    MS-Off Ver
    2010
    Posts
    4

    Displaying a range of business dates in one cell

    Hi,

    I am trying to display a range of business days in excel. I would like to exclude weekends and our company holidays but am unsure of how to write the formula. For example, I would like a cell to read:

    A1: 1/5/15 - 1/9/15
    A2: 1/12/15 - 1/16/15

    Any ideas?

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Displaying a range of business dates in one cell

    in what way though? whats your starting point? are these dates elsewhere in the sheet or are they to be generated?

    currently your question is the equivalent of "Im feeling ill, please cure me"
    If someone has helped you then please add to their Reputation

  3. #3
    Registered User
    Join Date
    12-16-2014
    Location
    San Diego, CA
    MS-Off Ver
    2010
    Posts
    4

    Re: Displaying a range of business dates in one cell

    Starting point is 12/31/14. I have a list of the dates, excluding holidays and workdays, in another column. Does that help clarify? Any other information that is needed?

  4. #4
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Displaying a range of business dates in one cell

    Not really.....

    Your starting point is 31st December 2014,
    what decides which range goes into each cell?
    how many cells are there?
    whats the end date?


    Are these weeks? ie a cell per week? and when you say you dont want to include holidays do you mean that if the Monday is a holiday then it would start on the Tuesday? ie imagine 5th jan is a holiday, would your first example be 01/06/15 - 01/09/15?


    * I really cant get to grips with how Americans write dates


    It would be very helpful if you could upload your spreadsheet or at least a good example of it, including both the list of dates/holidays and an example of what you want to see, I *think* this should be straightforward but want to be sure of the requirements first

  5. #5
    Registered User
    Join Date
    12-16-2014
    Location
    San Diego, CA
    MS-Off Ver
    2010
    Posts
    4

    Re: Displaying a range of business dates in one cell

    So the formula works from g15 to g16 because it is adding to the correct date. As I drop the formula down, the formula adds 3 and 7 to d13 to generate the date.

    The formula needs to be set up so it starts counting from the second date displayed in the range, not from the next row down.

    Any thoughts? Thanks for your help!!
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    12-16-2014
    Location
    San Diego, CA
    MS-Off Ver
    2010
    Posts
    4

    Re: Displaying a range of business dates in one cell

    Got it working using this formula:

    =MONTH(B2)&"/"&DAY(B2)&"/"&YEAR(B2)&" - "&MONTH(C2)&"/"&DAY(C2)&"/"&YEAR(C2)

  7. #7
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Displaying a range of business dates in one cell

    I dont think its possible with a function however it is with VBA.

    Add the following Sub to ThisWorkbook and run it, the results will be displayed in column L.

    Please Login or Register  to view this content.

  8. #8
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Displaying a range of business dates in one cell

    Quote Originally Posted by carobwell View Post
    Got it working using this formula:

    =MONTH(B2)&"/"&DAY(B2)&"/"&YEAR(B2)&" - "&MONTH(C2)&"/"&DAY(C2)&"/"&YEAR(C2)
    Im confused? your example doesnt even have any values in B & C? plus that formula is just displaying the values in B2 and C2 in a set format?

  9. #9
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: Displaying a range of business dates in one cell

    I am guessing he was testing elsewhere and ended up supplying that workbook. I added "Week: " in the output (Only because his example looked like he wants it to be in that final format) and removed the extra space from the second date or end of week date, other than that nice clean, simple method! I like it



    Please Login or Register  to view this content.
    -If you think you are done, Start over - ELeGault

  10. #10
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Displaying a range of business dates in one cell

    Quote Originally Posted by carobwell View Post
    Got it working using this formula:

    =MONTH(B2)&"/"&DAY(B2)&"/"&YEAR(B2)&" - "&MONTH(C2)&"/"&DAY(C2)&"/"&YEAR(C2)
    You could also do that with TEXT function like this

    =TEXT(B2,"m/d/yyyy")&" - "&TEXT(C2,"m/d/yyyy")
    Audere est facere

+ 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. Last Ten Business Dates
    By schmidt2301 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-26-2014, 01:59 PM
  2. One Cell Displaying Highest Of Range
    By TFunster in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-12-2013, 01:59 PM
  3. Replies: 2
    Last Post: 02-05-2013, 04:52 AM
  4. [SOLVED] Displaying a Range in a cell, but using other cells...
    By lhastings in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-23-2013, 07:32 PM
  5. Displaying in one cell a date range based on the dates of two different cells?
    By jonvanwyk in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-27-2011, 01: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