+ Reply to Thread
Results 1 to 4 of 4

If date in one cell is within the current week, then cell value = ...

  1. #1
    Forum Contributor
    Join Date
    07-03-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    139

    If date in one cell is within the current week, then cell value = ...

    What I am looking for is a way to set a cell value based on the date in another being within the current week. For example...
    Cell D2 value is Aug/15/2012, I want a formula that will set check to see if the date value in D2 is within the current week (8/12 - 8/18) , then set cell E2 = G2, if the date value IS NOT within the current week, then set E2 = $150.00.

    Can this be done?

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: If date in one cell is within the current week, then cell value = ...

    Try
    =IF(WEEKNUM(TODAY())=WEEKNUM(D2),G2,150)
    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Contributor
    Join Date
    07-03-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    139

    Re: If date in one cell is within the current week, then cell value = ...

    THAT ROCKS, thank you so much, works perfectly.

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

    Re: If date in one cell is within the current week, then cell value = ...

    ....of course the week number could be the same but in a different year (is that possible).....and comparing week numbers might not work at the start and end of the year when the week number changes midweek, so alternative formula......

    =IF(ABS(TODAY()-WEEKDAY(TODAY()-1)+3-D2)<=3,G2,150)
    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)

Tags for this Thread

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