+ Reply to Thread
Results 1 to 6 of 6

If And Now formatting macros

  1. #1
    Registered User
    Join Date
    03-28-2007
    Posts
    27

    If And Now formatting macros

    Hey Guys,

    I am trying to write a macro That would evaluate the following and make a conditional formatting change:
    If cell c2 = cell c1(which contains the now function) and cell b2 = cell c2 then change cell color to (whatever)

    also i'm trying to write a macro to change to a certain color when there is nothing in two cells:
    if cell a2 = blank and cell d2 = blank then make them pink.

    oh and naturally these would apply to a range of cells.

    I appreciate any help.
    Thanks,
    Ritz

  2. #2
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    For the first scenario, I am not entirely clear on your intent. Which cell do you want to format? Also, are you sure Now is the function you want to use? If that is the case, it will only change the format if it is run at the exact second of the other 2 cells, since Now is not just the date. If you are looking for just the date to be the same, then I would change the function to Today.

    For the second, I assume you only want the 2 cells to be formatted if they are both blank? If so:
    Please Login or Register  to view this content.
    Jason

  3. #3
    Registered User
    Join Date
    03-28-2007
    Posts
    27
    Thanks Jason that makes sense.

    In the first situation, Ultimately it is cell b2 whose color I am ultimately trying to change.

    Thanks a lot.
    -ritz

  4. #4
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    It would be set up in pretty much the same way, but it may change, depending on how you loop it for your actual range:
    Please Login or Register  to view this content.
    HTH

    Jason

  5. #5
    Registered User
    Join Date
    03-28-2007
    Posts
    27
    cool. thanks Jason.
    I'll give it a shot.

  6. #6
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    No problem.

+ 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