+ Reply to Thread
Results 1 to 5 of 5

Here is a tough question! IF formula output

  1. #1
    Registered User
    Join Date
    01-31-2007
    Posts
    2

    Exclamation Here is a tough question! IF formula output

    I am putting together a spreadsheet and I am pretty handy with Excel but ran into a problem and I would greatly appreciate any help.

    What I am trying to do is use an if formula, for example =IF(c3=d3,A,F), but instead of having the output if the value is true be A and the output if the value is false be F, I would like the value to be a solid green box if true and a solid red box if false......

    Anyone know how to do this?!?

    Thank you.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988

    Wink

    Hi,

    Could you enter this in your cell

    =C3=D3

    then use conditional formatting to change the cell colour if equal true or false. To hide the text you can change the font colour to your cell colour

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    01-31-2007
    Posts
    2

    thank you

    thanks, i think i have something working here!

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Glad to hear it

    VBA Noob

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    You don't really need a formula in the cell at all, which might be useful if you want any value in it. Assuming the cell you want to colour is E3

    Select E3
    Use ordinary formatting to colour cell red

    Then use conditional formatting with "formula is" option and formula

    =C3=D3

    select green pattern

    OK

    Of course both my suggestion and VBA Noob's will give you a green cell if both C3 and D3 are blank. You can prevent that if you want by altering formula to

    =(C3=D3)*(D3<>"")

+ 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