+ Reply to Thread
Results 1 to 10 of 10

return weeknumber from date, but only on mondays

  1. #1
    Registered User
    Join Date
    10-11-2014
    Location
    Norway
    MS-Off Ver
    2007
    Posts
    4

    return weeknumber from date, but only on mondays

    Solved

    hi guys!
    Been assigned to do a excel 2007 spreadsheet at work. Its a sheet showing bed capacity at a hospital. Now, I have:
    the dates from left to right in R3, weekdays as text in R4. In R2 I have the weeknumber using WEEKNUM based on date in R3.

    heres the thing: I only want the weeknumber to be returned in the cells in R2 that is above monday. nicer that way I think. Have tried conditional formatting where I make the font the same as backgorund colour based on WEEKDAY (>1) (I have manoday as day 1 in week), but cannot make it repeat for the whole year.

    Hase also tried to make formula in R2 where it only returns WEEKNUM if WEEKDAY is >1 but cannot get the arguments right.

    Any ideas?

    obviously, Im a beginner at this so please bear with me

    cheers!
    Last edited by reluctant; 10-12-2014 at 04:32 AM. Reason: solved

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: return weeknumber from date, but only on mondays

    =IF(WEEKDAY(A3)=2,YourFormulaHere,"")

    Change A3 to whichever cell your first date is actually in. Then copy this formula to the right.
    Last edited by BadlySpelledBuoy; 10-11-2014 at 10:17 AM.

  3. #3
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: return weeknumber from date, but only on mondays

    Your setup seems a bit confusing in how you are entering the dates? It sounds like you are entering many dates into 1 cell. If you are starting the dates in R3 and going from left to right like R3, S3, T3 etc. enter this in R2 and copy across with the dates.

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


    If I haven't understood correctly please upload a workbook.

    To attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: return weeknumber from date, but only on mondays

    My assumption was that R2, R3 and R4 means Row2, Row3 etc.

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: return weeknumber from date, but only on mondays

    I am wondering about that myself but when left to right is mentioned, I really don't know what the situation is.

  6. #6
    Registered User
    Join Date
    10-11-2014
    Location
    Norway
    MS-Off Ver
    2007
    Posts
    4

    Re: return weeknumber from date, but only on mondays

    Hi guys and thanks for the replies. Im at work so havent been able to check it out yet.
    R1=row 1, C1= column 1 etc. sorry if its confusing...
    I have the dates for every day of 2015 in one row, starting from left to right.
    Will let you know how it works out

  7. #7
    Registered User
    Join Date
    10-11-2014
    Location
    Norway
    MS-Off Ver
    2007
    Posts
    4

    Re: return weeknumber from date, but only on mondays

    sample.xlsx

    trying to attach... bear with me

  8. #8
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: return weeknumber from date, but only on mondays

    What are you wanting to add to the workbook that you uploaded? It seems that you have answered your own question. I have added conditional formatting to identify weekends.
    Attached Files Attached Files

  9. #9
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: return weeknumber from date, but only on mondays

    Attached is my interpretation of what you're trying to do.

    BSB.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    10-11-2014
    Location
    Norway
    MS-Off Ver
    2007
    Posts
    4

    Re: return weeknumber from date, but only on mondays

    Quote Originally Posted by BadlySpelledBuoy View Post
    Attached is my interpretation of what you're trying to do.

    BSB.
    That`s it! wow, thanks

    SOLVED

+ 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] Return Mondays date of a specified work week
    By soroh in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-21-2013, 06:49 AM
  2. [SOLVED] Return month for weeknumber
    By Hawken in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-25-2013, 06:19 AM
  3. Date range for weeknumber
    By Oly Steel Man in forum Excel General
    Replies: 1
    Last Post: 05-24-2011, 07:25 PM
  4. Return the dates of all the mondays and fridays in a month
    By all4excel in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-28-2007, 07:20 AM
  5. [SOLVED] Weeknumber of calendar date?
    By NorTor in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-19-2005, 11:10 AM

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