+ Reply to Thread
Results 1 to 7 of 7

If date in G2 is greater than date in C3 then make date in G2 same as date in C3

  1. #1
    Forum Contributor
    Join Date
    02-22-2014
    Location
    Winthrop, ME
    MS-Off Ver
    Excel 2010
    Posts
    420

    If date in G2 is greater than date in C3 then make date in G2 same as date in C3

    Good morning. I am working on a spreadsheet that tracks units used during each week of an authorization period. I have it set up to have a weekending date auto-fill based on dates in other cells. Currently, I have the spreadsheet set up for a 12 week authorization but I would like the dates to auto-fill only up to the last date of the authorization. I've tried nesting IF statements but can't get the wording correct. Here's what I'm attempting (in sentence format) to create in a formula:

    IF date in G2 is equal to date in C3 then stop auto-populating dates in adjacent cell, IF date in G2 is greater than date in C3 then make date in G2 same as date in C3.

    Thanks.

    Matthew


    Unit Tracking Sheet (blank).xlsm

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

    Re: If date in G2 is greater than date in C3 then make date in G2 same as date in C3

    In G2 copied right

    =IF(OR(F2=$C3,F2=""),"",IF(F2+7>$C3, $C3, F2+7))
    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 Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,135

    Re: If date in G2 is greater than date in C3 then make date in G2 same as date in C3

    Not sure about htis...

    =IF(F2="","",IF(F2+7>$C$3,$C$3,F2+7))
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: If date in G2 is greater than date in C3 then make date in G2 same as date in C3

    Quote Originally Posted by moosetales View Post
    IF date in G2 is equal to date in C3 then stop auto-populating dates in adjacent cell, IF date in G2 is greater than date in C3 then make date in G2 same as date in C3.
    Attachment 431426
    So in both cases, G2 is always equal to C3? and adjacent cell (H2,...,Q2) is always blank according to first IF?
    Quang PT

  5. #5
    Forum Contributor
    Join Date
    02-22-2014
    Location
    Winthrop, ME
    MS-Off Ver
    Excel 2010
    Posts
    420

    Re: If date in G2 is greater than date in C3 then make date in G2 same as date in C3

    Glenn,

    Your suggested formula did the trick exactly as needed. Thanks for providing the suggestion. I've attached a copy of the spreadsheet (with new formula) below. Thanks again.

    Unit Tracking Sheet (blank).xlsm

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,135

    Re: If date in G2 is greater than date in C3 then make date in G2 same as date in C3

    OK. Glad to have helped. However, I thought that ChemistB was probably what you had wanted.

    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  7. #7
    Forum Contributor
    Join Date
    02-22-2014
    Location
    Winthrop, ME
    MS-Off Ver
    Excel 2010
    Posts
    420

    Re: If date in G2 is greater than date in C3 then make date in G2 same as date in C3

    Glenn,

    (red faced-embarrassed) You are correct. It was ChemistB who suggested the formula that worked. Thanks for pointing that out and for weighing in on my matter.

    Matthew

+ 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] VBA Macro to Color Row Text If Date in Cell is greater than system date
    By slick9456 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-24-2014, 06:09 PM
  2. Counting if data falls on date between Start Date, End Date or Possible End Date
    By JessHasQuestions in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 07-26-2014, 08:01 AM
  3. [SOLVED] Macros for: If Today's Date minus other date is greater than certain amount of days Then
    By lottidotti in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-24-2012, 04:46 PM
  4. Replies: 1
    Last Post: 10-02-2012, 02:42 PM
  5. Replies: 6
    Last Post: 12-12-2011, 09:07 PM
  6. Replies: 4
    Last Post: 09-01-2011, 03:25 PM
  7. Minimum date greater than a specific date.
    By Joker in forum Excel General
    Replies: 3
    Last Post: 01-11-2006, 09:00 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