Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Mar 2003
    Posts
    174
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Flashing Cell or Fonts (Excel 2000)

    Is it possible to have a cell or fonts flash if certain conditions are not met ? For example, if the sum of certain cells is less than x, then a cell flashes to call to user's attention.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Flashing Cell or Fonts (Excel 2000)

    You'd have to write macros and use sheet-level events to accomplish this, but as a user, I would dislike cells flashing at me.

    It is very easy to give a cell a conspicuous border, background color or font using conditional formatting:
    <UL><LI>Select the cell.
    <LI>Select Format | Conditional Formatting...
    <LI>Select Formula is from the dropdown list.
    <LI>Type a condition like this: =Sum(A1:A4)<32 or =Sum(A1:A4)<D1.
    <LI>Click Formatting... and select the Font, Border and Pattern settings you like.
    <LI>Click OK twice.[/list]Perhaps not as "flashy" as you wanted, but simple and effective.

  3. #3
    New Lounger
    Join Date
    Jun 2003
    Location
    Australind, Western Australia, Australia
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Flashing Cell or Fonts (Excel 2000)

    Hi Tcq

    Yes it is possible but as pointed out. Conditional Formatting would be best suited. However, if you go here:
    OzGrid VBA and scroll down to "Make a Cell Range Flash Different Colors" you will see some code.

  4. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Flashing Cell or Fonts (Excel 2000)

    Hi TQ2,

    To make a cell flash every second if it's value is 1, you could use conditional formatting in the target cell, with the formula:
    =AND(MOD(VALUE(TEXT(NOW(),"ss")),2)=0,A1=1)
    and set the conditional format to whatever font/background/border arrangement you want. Then add the following macro to the workbook:
    Sub FlashCell()
    Range("A1").Calculate
    Application.OnTime Now + TimeValue("0:00:01"), "FlashCell"
    End sub

    Run the macro and the target cell will flash if your criterion is met.

    Note: Change "A1" in the above references to any cell that does not contain a formula - unless you actually want the nominated cell to recalculate every second.

    Once the above has been done, all you need to do to make other cells flash is to copy the conditional format to those cells, changing nothing more than the "A1=1" argument to whatever 'flash' criterion you want. For example, if you want more than one cell to flash if "A1=1" , change "A1=1" to "$A$1=1" and apply/copy the format to those cells also.

    You could even get fancy, having up to three sequential flashes of the cell, by adding conditional format arguments and making the conditional format formulae, in turn:
    =AND(MOD(VALUE(TEXT(NOW(),"ss")),4)=1,A1=1)
    =AND(MOD(VALUE(TEXT(NOW(),"ss")),4)=2,A1=1)
    =AND(MOD(VALUE(TEXT(NOW(),"ss")),4)=3,A1=1)

    Be warned, though, routines like this can chew up CPU resources (ie they slow things down) and they tend to destroy copy/paste and undo abilities too.

    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •