+ Reply to Thread
Results 1 to 2 of 2

individual formatting cell in a range

  1. #1
    Registered User
    Join Date
    01-15-2008
    Posts
    3

    Question individual formatting cell in a range

    Hi,

    What I am trying to figure out is if I state a range being say from $A$1:$A$100, each containing a date.
    How do you then do an IF function in VBA so that if a date entered is which is either less, equal or greater than a stated date, the cell colour and text formatting is changed accordingly in real time.

    The conditional formatting tool on this occasion is not applicable due to the data being copied and pasted from other sources.

    Brian.

  2. #2
    Registered User
    Join Date
    01-07-2008
    Posts
    38

    Possibilities

    Hi,

    I can think of two things that might work for you.

    - Use a Worksheet_Change macro that does what you describe. This event handler will fire whenever a cell in that worksheet changes and you can test and do formatting if desired. Remember that it will fire for all changes to all cells in that sheet, so you will need to make it be pretty selective.

    - You mentioned that pasting from other sources didn't solve the problem. I presume that's because you were also copying formatting. If that's true, try Paste Special and only paste the value. If you have already applied conditional formatting to the cell(s), that should be left intact and will reflect the color of the date.

    Good luck,
    Chuck L

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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