Results 1 to 5 of 5
  1. #1
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Conditional Format refers to InCell W/S Funcion (Excel 2002)

    Hi,
    Can a person refer the conditional format feature to use a function in a cell.
    IE: If I have a list in A1:E10 and I want to highlight alternating rows. I will put a function in cell G1 such as : =MOD(ROW(),2)=0.
    Then I set up Conditional Formatting to use the function in cell G1. If I edit the function in G1 it should update the conditional formatting!

    I know I can type the function into Conditional Format Dialog using Formula Is..., BUT I want to know if the formula can rather exist in the sheet???

    Any ideas
    Regards,
    Rudi

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

    Re: Conditional Format refers to InCell W/S Funcion (Excel 2002)

    You can use a defined name for this:

    - Select Insert | Name | Define...
    - In the 'Names in workbook' box, enter IsRowEven
    - In the 'Refers to' box, enter =MOD(ROW(),2)=0
    - Click OK

    - Select A1:E10.
    - Select Format | Conditional Formatting...
    - Select 'Formula Is' from the dropdown list.
    - In the box next to it, enter =IsRowEven
    - Click Format... and set the desired formatting, then click OK.
    - Click OK to close the Conditional Formatting dialog.

    If you change the definition of the defined name IsRowEven, the conditional formatting will adjust itself automatically.

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Conditional Format refers to InCell W/S Funcion (Excel 2002)

    This is a smart suggestion and will work quiet well...Tx.

    Based on the workaround answer you gave me though ... I assume that it can't be done by refering Cond. Format to read the formula directly from a cell. I did try it multiple times and it did not work?!
    Regards,
    Rudi

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

    Re: Conditional Format refers to InCell W/S Funcion (Excel 2002)

    I don't think so - a formula such as =MOD(ROW(),2)=0 in G1 will always return a result based on G1. There is no "evaluate a formula string" feature (except perhaps in an add-in), AFAIK.

  5. #5
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Conditional Format refers to InCell W/S Funcion (Excel 2002)

    Tx. I just needed a second opinion/confirmation!
    Cheers
    Regards,
    Rudi

Posting Permissions

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