+ Reply to Thread
Results 1 to 3 of 3

Combining Date and Text

  1. #1
    Registered User
    Join Date
    08-16-2008
    Location
    Edmonton, Alberta, Canada
    Posts
    69

    Combining Date and Text

    Hello,

    I have a workbook where I track projects. Whenever I enter an update in the comments section for a particular project I enter the current date and the word UPDATE! into a column labelled Updated. The format should look like the following.

    18-Aug-08

    UPDATED!


    As I have to do this on a regular basis I wanted to create a macro that would do this. I came up with the following.

    Please Login or Register  to view this content.
    It works great except that any cell that I run this macro against will see the date change every day as I used TODAY() in my formula.

    Is there a way that I can change this so that after I run the macro and the date is entered that it doesn't change until the next time it's run?

    Thanks and regards,
    Chris
    Last edited by NBVC; 10-08-2008 at 09:10 PM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    Hi eckert,

    Two things:
    1. Do you need a formula in the selected cell, or would it be OK for the macro to insert the date as a static value along with the "UPDATE!" text?
    2. You may be able to shorten your code by removing most of the default cell formatting code. As an example (including the change from #1 above):
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-16-2008
    Location
    Edmonton, Alberta, Canada
    Posts
    69

    Thumbs up Thank you.

    Thank you Paul. I tested it out and it works great. I like your code better as it also allows me to apply different font formatting to the date and text.

    Take care,
    Chris

+ 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. Validate date entry in a text box.
    By Flintstone in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-30-2008, 03:44 PM
  2. Date and Text combining
    By iangreen in forum Excel General
    Replies: 2
    Last Post: 06-18-2007, 11:11 AM
  3. Entering text, convert to date
    By polishmf in forum Excel General
    Replies: 4
    Last Post: 03-12-2007, 12:59 PM
  4. Mixing text with date format in a single cell
    By jgclickfind in forum Excel General
    Replies: 2
    Last Post: 02-14-2007, 03:42 PM
  5. String converts to date - text doesn't help!
    By KathyC in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-08-2006, 10:48 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