Change font color based on cell value

  • I am creating a form in which I have a set range of values. I would like to change the text color if the value is out of my set range. How do I write this IF formula?

  • Re: Writing an "IF" formula change text color


    This should get you started. Place it in the worksheet modual.





    Its a conditional format macro. Im new to VBA also and just thought i would try and help. :smile:

    [SIZE=3]The Only Dumb Question Is A Question Not Asked.[/SIZE]

  • Re: Change font color based on cell value


    Hello lsmoove,


    Welcome to Ozgrid.


    Thread titles are important for obtaining good search results and should be written with this thought in mind -- that is, the title should be "search friendly", meaning a search using YOUR title as the search terms will yield relevant results. Thread titles should concisley and accurately describe the content of your thread.


    Note the change in your title, based on your overall thread content, as an example when creating future threads.



    What kind of "form" are you using? Is this a custom User Form with VBA code or is this a worksheet "form". If the latter, then use the built in conditional formatting. If you are using a customer User Form, then see the link provided in previous post.

  • Re: Change font color based on cell value


    Take a look at the link YuraYong provided. I believe that will be your best shot. The code i provided was a recording of setting a conditional format. HTH


    Is your data on a worksheet or a userform?

    [SIZE=3]The Only Dumb Question Is A Question Not Asked.[/SIZE]

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!