+ Reply to Thread
Results 1 to 3 of 3

Thread: Can I change a cell colour using an IF formula, not conditional formatting?

  1. #1
    Registered User
    Join Date
    01-28-2012
    Location
    Scotland
    MS-Off Ver
    Excel 2011
    Posts
    2

    Can I change a cell colour using an IF formula, not conditional formatting?

    This may be a simple formula but i cant seem to figure it out and i have limited knowlege of excel.

    I'm trying to get a cell or text colour to change when 2 identical numbers are entered with in a range of cells.

    Example, if 5552666 was entered in A1 then if at some later point in a range of cells between A1 & A50, lets say A8 its entered again 5552666 then I would like A1 & A8 to turn red.

    Conditional formatting (equal to then turn red) would be the easy solution but it wont let me put a range of cells in.

    I have this formula so far but
    1.dont know how to finish it &
    2.dont even know if its right.
    =if(OR(B5=B6,B5=B7,B5=B8,B5=B9,B5=B10))

    Any help appreciated
    Last edited by suxrule; 01-29-2012 at 09:54 AM.

  2. #2
    Forum Guru Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    5,590

    Re: Can I change a cell colour using an IF formula, not conditional formatting?

    Try this
    Select the range to format A1:A50
    Formula is:=
    =COUNTIF($A:$A,A1)>1
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However, if this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
    Also
    If you are satisfied by any members response to your problem please consider using the small Star icon botom left of thier post to show your appreciation.

  3. #3
    Registered User
    Join Date
    01-28-2012
    Location
    Scotland
    MS-Off Ver
    Excel 2011
    Posts
    2

    Re: Can I change a cell colour using an IF formula, not conditional formatting?

    thanks, worked perfectly

+ 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.2.0