+ Reply to Thread
Results 1 to 13 of 13

formula to indicate date range on a calendar

  1. #1
    Forum Contributor
    Join Date
    03-09-2007
    Location
    Australia
    MS-Off Ver
    Office 10
    Posts
    371

    formula to indicate date range on a calendar

    I have attached a file which indicates what I am trying to achieve.
    The first question is can this be done and then who do I set it up

    Any assistance appreciated

    Barry
    Attached Files Attached Files

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

    Please change your thread title as per forum rules, specifically rule 1 which says that "Your post title should accurately and concisely describe your problem".

    It's concise, I'll give you that, but I would assume that virtually any post in the "Excel worksheet functions" forum could be labelled "worksheet formula". Please be more specific, thanks.

  3. #3
    Forum Contributor
    Join Date
    03-09-2007
    Location
    Australia
    MS-Off Ver
    Office 10
    Posts
    371

    Task Calculator

    Thanks
    Not sure how to change the title
    Can you assist please

  4. #4
    Forum Contributor
    Join Date
    03-09-2007
    Location
    Australia
    MS-Off Ver
    Office 10
    Posts
    371
    Am still trying to find out how I edit the title of this thread

  5. #5
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,615
    Last edited by protonLeah; 05-09-2008 at 12:20 AM.
    Ben Van Johnson

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Apologies, Barry, I wasn't deliberately ignoring you. It was late here when you posted back so I was off to my bed....also I should have linked to the rules [thanks protonLeah]

    I changed the thread title for you....

    Note you might want to post that file as a version other than Excel 2007, otherwise users without that version won't be able to open it.....

    Given your example you could get an X in the cells you want by using this formula in B6 copied across and down

    =IF(AND($B$2+B$4-1>=$F18,$B$2+B$4-1<=$O18),"X","")

    Note: I assumed that the tasks in A6:A13 would be listed in the same order as A18:A25, although you could modify the formula if that isn't so.....

  7. #7
    Forum Contributor
    Join Date
    03-09-2007
    Location
    Australia
    MS-Off Ver
    Office 10
    Posts
    371
    Your are brilliant however when I pasted the formula into one cell it wanted to occupy 2
    See attached
    Thanks for your assistance
    Attached Files Attached Files

  8. #8
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    The cell are merged. This happens sometimes if you copy from forum into the spreadsheet

    Instead of copying direct into the cell select the cell first then paste the formula into the formula bar

    http://www.guidesandtutorials.com/im...ll_formula.gif

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  9. #9
    Forum Contributor
    Join Date
    03-09-2007
    Location
    Australia
    MS-Off Ver
    Office 10
    Posts
    371
    Many thanks.
    And huge alteration to the formular if it spans a number of months.
    The Sheet I am working on has 6 months one after the other

    Appreciat your assistance

  10. #10
    Forum Contributor
    Join Date
    03-09-2007
    Location
    Australia
    MS-Off Ver
    Office 10
    Posts
    371
    Many thanks again I have figured out the rest for the moment.
    But while I am on a roll can the formula be adjusted to eliminate the X on the Saturday and the Sunday.
    I tend to shade these days in Grey.

    Your help in solving this problem is much appreciated

    Barry

  11. #11
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    On your example the days of the week in B3:AF3 don't correctly match the dates. You could automate this with this formula in B3 copied across

    =LEFT(TEXT($B2+B4-1,"ddd"))

    and then the formula for B6, adjusted to exclude weekends, would be

    =IF(AND($B$2+B$4-1>=$F18,$B$2+B$4-1<=$O18,B$3<>"S"),"X","")

    Note: If you're only placing an "X" in the relevant cells in order that they get shaded then you could do that directly through conditional formatting without the need for formulas on the worksheet.

  12. #12
    Forum Contributor
    Join Date
    03-09-2007
    Location
    Australia
    MS-Off Ver
    Office 10
    Posts
    371
    Appreciate the help
    Thanks

    Barry

  13. #13
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi Daddy,

    Note you might want to post that file as a version other than Excel 2007, otherwise users without that version won't be able to open it.....
    You may find this useful

    http://office.microsoft.com/en-us/ex...141071033.aspx
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

+ 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