+ Reply to Thread
Results 1 to 4 of 4

Date Forumla

  1. #1
    Registered User
    Join Date
    07-01-2007
    Posts
    9

    Date Forumla

    im currently stuck on excel spreadsheet with this problem.

    for example cell a is full of date dd/mm/yyyy what i want to do is use this field to solve the two conditions below.

    If the day in the date column falls on a weekend, populate the field with a 1, otherwise 0

    If the day in the date column is a Saturday, populate the column with SAT otherwise leave blank.

    any ideas or thoughts

  2. #2
    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
    Not sure if this is what your after

    =IF(WEEKDAY(A1)=7,"Sat",IF(WEEKDAY(A1)=1,1,0))

    You say you want a 1 for a weekend and Sat for Sat. Do you want both ??

    VBA Noon
    _________________________________________


    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 !!!

  3. #3
    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
    Please read forum rules. Reply to people in thread and not by PM them.

    Does this help.

    =IF(OR(WEEKDAY(A1)=7,WEEKDAY(A1)=1),1,0)

    VBA Noob

  4. #4
    Registered User
    Join Date
    07-01-2007
    Posts
    9

    Smile formula

    thank you very much !!!

+ 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