+ Reply to Thread
Results 1 to 8 of 8

Formula with dates

  1. #1
    Registered User
    Join Date
    11-17-2003
    Posts
    31

    Question Formula with dates

    Hi,

    I'm trying to get column B (dates) to be a copy of column A (same dates but 1 month behind) and need to get the formula to ignore coloured cells (weekends).. any ideas?

  2. #2
    Forum Contributor
    Join Date
    02-28-2006
    Posts
    690
    List all weekend dates for the next 5 years in a lookup table, then test dates for "is this a weekend date, if so ignore it otherwise use it"

  3. #3
    Ardus Petus
    Guest

    Re: Formula with dates

    In B1, enter:
    =IF(OR(WEEKDAY(A1)=1,WEEKDAY(A1)=6,"",DATE(YEAR(A1),MONTH(A1)+1,DAY(A1)))
    then copy down

    HTH
    --
    AP

    "lara5555" <[email protected]> a écrit
    dans le message de
    news:[email protected]...
    >
    > Hi,
    >
    > I'm trying to get column B (dates) to be a copy of column A (same dates
    > but 1 month behind) and need to get the formula to ignore coloured cells
    > (weekends).. any ideas?
    >
    >
    > --
    > lara5555
    > ------------------------------------------------------------------------
    > lara5555's Profile:

    http://www.excelforum.com/member.php...fo&userid=2741
    > View this thread: http://www.excelforum.com/showthread...hreadid=529519
    >




  4. #4
    Bob Phillips
    Guest

    Re: Formula with dates

    Friday is a weekend in France Ardus? I always knew you were civilized <bg>

    alternative

    =IF(WEEKDAY(A1,2)>5,"",DATE(YEAR(A1),MONTH(A1)+1,DAY(A1)))

    Lara,

    What happens when the calculated date is a weekend?

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "Ardus Petus" <[email protected]> wrote in message
    news:[email protected]...
    > In B1, enter:
    > =IF(OR(WEEKDAY(A1)=1,WEEKDAY(A1)=6,"",DATE(YEAR(A1),MONTH(A1)+1,DAY(A1)))
    > then copy down
    >
    > HTH
    > --
    > AP
    >
    > "lara5555" <[email protected]> a écrit
    > dans le message de
    > news:[email protected]...
    > >
    > > Hi,
    > >
    > > I'm trying to get column B (dates) to be a copy of column A (same dates
    > > but 1 month behind) and need to get the formula to ignore coloured cells
    > > (weekends).. any ideas?
    > >
    > >
    > > --
    > > lara5555
    > > ------------------------------------------------------------------------
    > > lara5555's Profile:

    > http://www.excelforum.com/member.php...fo&userid=2741
    > > View this thread:

    http://www.excelforum.com/showthread...hreadid=529519
    > >

    >
    >




  5. #5
    Ardus Petus
    Guest

    Re: Formula with dates

    Week-ends stretch from Thursday night to Monday aftternoon!

    "Bob Phillips" <[email protected]> a écrit dans le message
    de news:%[email protected]...
    > Friday is a weekend in France Ardus? I always knew you were civilized <bg>
    >
    > alternative
    >
    > =IF(WEEKDAY(A1,2)>5,"",DATE(YEAR(A1),MONTH(A1)+1,DAY(A1)))
    >
    > Lara,
    >
    > What happens when the calculated date is a weekend?
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (remove nothere from email address if mailing direct)
    >
    > "Ardus Petus" <[email protected]> wrote in message
    > news:[email protected]...
    > > In B1, enter:
    > >

    =IF(OR(WEEKDAY(A1)=1,WEEKDAY(A1)=6,"",DATE(YEAR(A1),MONTH(A1)+1,DAY(A1)))
    > > then copy down
    > >
    > > HTH
    > > --
    > > AP
    > >
    > > "lara5555" <[email protected]> a

    écrit
    > > dans le message de
    > > news:[email protected]...
    > > >
    > > > Hi,
    > > >
    > > > I'm trying to get column B (dates) to be a copy of column A (same

    dates
    > > > but 1 month behind) and need to get the formula to ignore coloured

    cells
    > > > (weekends).. any ideas?
    > > >
    > > >
    > > > --
    > > > lara5555

    > >

    > ------------------------------------------------------------------------
    > > > lara5555's Profile:

    > > http://www.excelforum.com/member.php...fo&userid=2741
    > > > View this thread:

    > http://www.excelforum.com/showthread...hreadid=529519
    > > >

    > >
    > >

    >
    >




  6. #6
    Registered User
    Join Date
    11-17-2003
    Posts
    31
    Hi Bob,

    Week started with a Monday and Tues to Sat have appeared as #NAME?


    Quote Originally Posted by Bob Phillips
    Friday is a weekend in France Ardus? I always knew you were civilized <bg>

    alternative

    =IF(WEEKDAY(A1,2)>5,"",DATE(YEAR(A1),MONTH(A1)+1,DAY(A1)))

    Lara,

    What happens when the calculated date is a weekend?

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "Ardus Petus" <[email protected]> wrote in message
    news:[email protected]...
    > In B1, enter:
    > =IF(OR(WEEKDAY(A1)=1,WEEKDAY(A1)=6,"",DATE(YEAR(A1),MONTH(A1)+1,DAY(A1)))
    > then copy down
    >
    > HTH
    > --
    > AP
    >
    > "lara5555" <[email protected]> a écrit
    > dans le message de
    > news:[email protected]...
    > >
    > > Hi,
    > >
    > > I'm trying to get column B (dates) to be a copy of column A (same dates
    > > but 1 month behind) and need to get the formula to ignore coloured cells
    > > (weekends).. any ideas?
    > >
    > >
    > > --
    > > lara5555
    > > ------------------------------------------------------------------------
    > > lara5555's Profile:

    > http://www.excelforum.com/member.php...fo&userid=2741
    > > View this thread:

    http://www.excelforum.com/showthread...hreadid=529519
    > >

    >
    >

  7. #7
    Bob Phillips
    Guest

    Re: Formula with dates

    Don't you just love France (well I do)?

    Bob

    "Ardus Petus" <[email protected]> wrote in message
    news:[email protected]...
    > Week-ends stretch from Thursday night to Monday aftternoon!
    >
    > "Bob Phillips" <[email protected]> a écrit dans le message
    > de news:%[email protected]...
    > > Friday is a weekend in France Ardus? I always knew you were civilized

    <bg>
    > >
    > > alternative
    > >
    > > =IF(WEEKDAY(A1,2)>5,"",DATE(YEAR(A1),MONTH(A1)+1,DAY(A1)))
    > >
    > > Lara,
    > >
    > > What happens when the calculated date is a weekend?
    > >
    > > --
    > > HTH
    > >
    > > Bob Phillips
    > >
    > > (remove nothere from email address if mailing direct)
    > >
    > > "Ardus Petus" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > In B1, enter:
    > > >

    > =IF(OR(WEEKDAY(A1)=1,WEEKDAY(A1)=6,"",DATE(YEAR(A1),MONTH(A1)+1,DAY(A1)))
    > > > then copy down
    > > >
    > > > HTH
    > > > --
    > > > AP
    > > >
    > > > "lara5555" <[email protected]> a

    > écrit
    > > > dans le message de
    > > > news:[email protected]...
    > > > >
    > > > > Hi,
    > > > >
    > > > > I'm trying to get column B (dates) to be a copy of column A (same

    > dates
    > > > > but 1 month behind) and need to get the formula to ignore coloured

    > cells
    > > > > (weekends).. any ideas?
    > > > >
    > > > >
    > > > > --
    > > > > lara5555
    > > >

    > > ------------------------------------------------------------------------
    > > > > lara5555's Profile:
    > > > http://www.excelforum.com/member.php...fo&userid=2741
    > > > > View this thread:

    > > http://www.excelforum.com/showthread...hreadid=529519
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >




  8. #8
    Bob Phillips
    Guest

    Re: Formula with dates

    Really? What dates are you using, and are they real dates? I don't see that
    behaviour in my spreadsheet.

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "lara5555" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Bob,
    >
    > Week started with a Monday and Tues to Sat have appeared as #NAME?
    >
    >
    > Bob Phillips Wrote:
    > > Friday is a weekend in France Ardus? I always knew you were civilized
    > > <bg>
    > >
    > > alternative
    > >
    > > =IF(WEEKDAY(A1,2)>5,"",DATE(YEAR(A1),MONTH(A1)+1,DAY(A1)))
    > >
    > > Lara,
    > >
    > > What happens when the calculated date is a weekend?
    > >
    > > --
    > > HTH
    > >
    > > Bob Phillips
    > >
    > > (remove nothere from email address if mailing direct)
    > >
    > > "Ardus Petus" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > In B1, enter:
    > > >

    > >

    =IF(OR(WEEKDAY(A1)=1,WEEKDAY(A1)=6,"",DATE(YEAR(A1),MONTH(A1)+1,DAY(A1)))
    > > > then copy down
    > > >
    > > > HTH
    > > > --
    > > > AP
    > > >
    > > > "lara5555" <[email protected]> a

    > > écrit
    > > > dans le message de
    > > > news:[email protected]...
    > > > >
    > > > > Hi,
    > > > >
    > > > > I'm trying to get column B (dates) to be a copy of column A (same

    > > dates
    > > > > but 1 month behind) and need to get the formula to ignore coloured

    > > cells
    > > > > (weekends).. any ideas?
    > > > >
    > > > >
    > > > > --
    > > > > lara5555
    > > > >

    > > ------------------------------------------------------------------------
    > > > > lara5555's Profile:
    > > > http://www.excelforum.com/member.php...fo&userid=2741
    > > > > View this thread:

    > > http://www.excelforum.com/showthread...hreadid=529519
    > > > >
    > > >
    > > >

    >
    >
    > --
    > lara5555
    > ------------------------------------------------------------------------
    > lara5555's Profile:

    http://www.excelforum.com/member.php...fo&userid=2741
    > View this thread: http://www.excelforum.com/showthread...hreadid=529519
    >




+ 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