+ Reply to Thread
Results 1 to 5 of 5

If cell contains Today() return adjacent cell with Text

  1. #1
    Registered User
    Join Date
    03-01-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    78

    If cell contains Today() return adjacent cell with Text

    Is it possible to create a code to check cells in column O for today's date, if yes clear cell and write text to the adjacent cell in column P?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: If cell contains Today() return adjacent cell with Text

    I am not clear about what you are trying to achieve!

    In cell P3, =IF(O3=TODAY(),"A","") will cause the letter A to appear in P3, but tomorrow, it will no longer be true, so the cell will be blank.

    However, I expect you want a macro. This can be accomplished, but I need more information!

    1. What do you want the text to be?
    2. What range do you want to work on?
    3. How often do you do this?

    Looking at the example you posted, you would end up with O3,O4,O5,O9 and O14 all blank with something in the adjacent column.
    I hope this helps, please let me know!

    Regards,

    David


    - Please click on the *Add Reputation button at the bottom of helpful responses.

    Please mark your thread as SOLVED:
    - Click Thread Tools above your first post, select "Mark your thread as Solved".


  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486

    Re: If cell contains Today() return adjacent cell with Text

    You were on the right track.

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    03-01-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    78

    Re: If cell contains Today() return adjacent cell with Text

    Hi David, thanks for the input.
    For me, it will be a growing workbook.
    The dates are entered at different time frame. What I would like to achieve is when the dates in column O equals to current date, the cell will be cleared and return text in adjacent cell and stay there till further changes made manually. To answer your questions:

    [1] What do you want the text to be?
    To be finalised, could be "immediate", "overdue", etc

    [2] What range do you want to work on?
    In column O, range (O3: O5000)

    [3] How often do you do this?
    Daily

    My apology. O3,O4,O5,O9 and O14 should be filled with text.

    Thanks

  5. #5
    Registered User
    Join Date
    03-01-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    78

    Re: If cell contains Today() return adjacent cell with Text

    Quote Originally Posted by davesexcel View Post
    You were on the right track.

    Please Login or Register  to view this content.
    Dave, thanks for the code. It WORKS!

    Thanks
    Last edited by whoosh; 10-27-2015 at 09:51 AM.

+ 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] If a cell in a column equals today's date return the value of another cell adjacent to it
    By DeanExcel in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-24-2021, 01:38 AM
  2. Replies: 3
    Last Post: 07-21-2015, 05:10 PM
  3. [SOLVED] Check cell for text and return corresponding txt in adjacent cell
    By stu29 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-29-2014, 09:55 AM
  4. Finding a text in a row and return exactly the adjacent cell value
    By msourav84 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-28-2013, 08:06 AM
  5. Replies: 6
    Last Post: 02-28-2013, 11:27 AM
  6. Return Text in Adjacent Cell
    By Jungilingus in forum Excel General
    Replies: 1
    Last Post: 04-05-2008, 04:07 PM
  7. Formula to return text in adjacent cell
    By Jack B in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-09-2007, 09:31 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