+ Reply to Thread
Results 1 to 14 of 14

static date Via vba based on if condition

  1. #1
    Registered User
    Join Date
    11-25-2020
    Location
    India
    MS-Off Ver
    365
    Posts
    6

    static date Via vba based on if condition

    Need support to update Static date in cell based on If Condition.

    I m updating this formula in U3 Cell =IF(T3=$U$1,NOW(),"No")

    Next day if i open the same file, i need old date not current date.

    Thanks in Advance

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,367

    Re: static date Via vba based on if condition

    You need to use VBA code to do that - this code will get you going, but I don't know whether you are changing U1 or T3 or if you have more than one cell with the formula. I have assumed that you are changing U1, that V1 is not used, and that you have a column of formula in T, starting in T3. If any of that is wrong, they you need to explain better...

    1) Copy this code.
    2) Right-Click the sheet tab of interest.
    3) Select "View Code"
    4) Paste the code into the window that appears.
    5) Save the file as a macro-enabled .xlsm file.
    6) Make changes as needed

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    O365 V2408
    Posts
    15,138

    Re: static date Via vba based on if condition

    Could use a helper cell...
    Please Login or Register  to view this content.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  4. #4
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: static date Via vba based on if condition

    Here is another approach based on the same principle Bernie mentions above. I assume this is needed for only one cell.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-25-2020
    Location
    India
    MS-Off Ver
    365
    Posts
    6

    Re: static date Via vba based on if condition

    Thanks a Lot Bernie Deitrick , sintek and maniacb

    Attachment 733616 Here is my requirement. based on Candidate name and which round he is in based on drop down, the system date should change accordingly.

  6. #6
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    O365 V2408
    Posts
    15,138

    Re: static date Via vba based on if condition

    Invalid attachment...See Top Yellow Banner re sample upload...

  7. #7
    Registered User
    Join Date
    11-25-2020
    Location
    India
    MS-Off Ver
    365
    Posts
    6

    Re: static date Via vba based on if condition

    Thanks for the update. Please check i have attached sample file
    Attached Files Attached Files

  8. #8
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    O365 V2408
    Posts
    15,138

    Re: static date Via vba based on if condition

    If this is not working then please explain in a bit more detail what it is you are wanting to achieve...step by step

    Assumes all headings are available...

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Sintek; 05-22-2021 at 04:15 AM.

  9. #9
    Registered User
    Join Date
    11-25-2020
    Location
    India
    MS-Off Ver
    365
    Posts
    6

    Re: static date Via vba based on if condition

    Thanks a Looooot Sintek , Its working Great. One small request. In a Row , if i change the Round from Round 2 to Round 3. The Old Date in Round 2 should Erase and current date should appear in Round 3. Thanks Thanks Once again. thanks in Advance.

  10. #10
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    O365 V2408
    Posts
    15,138

    Re: static date Via vba based on if condition

    Insert red snippet...
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    11-25-2020
    Location
    India
    MS-Off Ver
    365
    Posts
    6

    Re: static date Via vba based on if condition

    Thanks Thanks a Lot Sintek for your continuous support. You have attached one Excel "Copy of TEST.xslm" in that If i delete cell value in Column B(Dropdown) all dates updated in Row (C to G) Should clear.

    I m new to VBA, so that i m asking. Dont mistake me for asking more validations.

  12. #12
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    O365 V2408
    Posts
    15,138

    Re: static date Via vba based on if condition

    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    11-25-2020
    Location
    India
    MS-Off Ver
    365
    Posts
    6

    Re: static date Via vba based on if condition

    Thanks a Lot Sintek. you are Awesome. Thanks for you Continuous Support.

  14. #14
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    O365 V2408
    Posts
    15,138

    Re: static date Via vba based on if condition

    .........................
    Thanks.png

+ 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] Macro Required to add static date and time when IF condition is true(PAID)
    By Danymanson in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 06-01-2017, 08:52 AM
  2. Formula for certain date to appear based on a static today's date
    By jasminew in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-12-2017, 05:58 AM
  3. Highlight Rows Based on Date Range Using Static Date and Current Date
    By SaraStravers in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-23-2015, 07:38 PM
  4. Static date with if condition
    By ajeshvnair in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-05-2013, 03:46 PM
  5. [SOLVED] Static Date insert based on drop down
    By playtowinpb@msn.com in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-07-2012, 02:13 PM
  6. [SOLVED] Using Today() and making it Static based on a particular condition. Part-II
    By all4excel in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-04-2008, 03:49 AM
  7. [SOLVED] Using Today() and making it Static based on a particular condition.
    By all4excel in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-29-2008, 05:09 PM

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