+ Reply to Thread
Results 1 to 4 of 4

Excel-formula If

  1. #1
    Registered User
    Join Date
    07-27-2012
    Location
    Cyprus
    MS-Off Ver
    Excel 2007
    Posts
    1

    Excel-formula If

    Hi

    I am trying to create a formula that when someone create a cell on my excel, i want the excel automatically to create the date of the post.
    I created the following formula but it seems that it doesn't work : =if(B3="*",Today(),(""))
    I wanted to write : if cell B3 contain text then A3 should write the today's date otherwise it should remain empty.
    Can anyone advice me who to make it to work?
    Thanks

  2. #2
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: Excel-formula If

    try
    =IF(ISTEXT(B3),TODAY(),"")
    or
    =IF(B3<>"",TODAY(),"")

  3. #3
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: Excel-formula If

    Try this


    =if(B3="*",Today(),"")
    Click on star (*) below if this helps

  4. #4
    Valued Forum Contributor
    Join Date
    07-17-2005
    Location
    Abergavenny, Wales, UK
    MS-Off Ver
    XL2003, XL2007, XL2010, XL2013, XL2016
    Posts
    608

    Re: Excel-formula If

    Hi
    You cannot do this without VBA.

    You could enter in A3
    =IF(B3="","",today())

    But, Today() is volatile, and when you open your workbook tomorrow, the date will alter.

    If you are happy to use a VBA solution, then the following vent code would need to be added to your sheet.



    Please Login or Register  to view this content.

    To use
    Copy code above
    Press Alt+F11 to enter the VB Editor
    Paste the code into the white pane that appears
    Alt+F11 to return to Excel

    You will need to save your file as a .xlsm file

    See the attached file
    Attached Files Attached Files
    Last edited by Cutter; 07-27-2012 at 09:49 AM. Reason: Added code tags
    --
    Regards
    Roger Govier
    Microsoft Excel MVP

+ 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