102830 Posted November 29, 2004 Share Posted November 29, 2004 instead of using conditional formatting in excel to change the colour of a cell, is there a formula where the cell can = the colour red. thanks for your help.chris Link to comment Share on other sites More sharing options...
Shotgun Posted November 29, 2004 Share Posted November 29, 2004 What you want can be done with VB for Applications (VBA). Please be more specific of what is you are trying to accomplish, that could provide more info to help you better. Link to comment Share on other sites More sharing options...
102830 Posted November 30, 2004 Author Share Posted November 30, 2004 i would like a cell to say IF(c1=c2,"CELL COLOUR IS RED","CELL COLOUR IS BLUE")But how do i write this properly so the cell colours actually change. i cannot use conditional formatting, because on the shared workbook i am using it is not accessible. thanks Link to comment Share on other sites More sharing options...
Shotgun Posted December 2, 2004 Share Posted December 2, 2004 If what you mean to do is that if cell #1 equals cell #2, if they are equal one of them turns red (you did not specify which one), else (cell #1 <> cell #2) then one of them turns blue. IF that is what you want, maybe this could help.Let's say you have a number on A1 and if it equals that of A2 then A3 would become Red, else A3 would be GreenIf ActiveSheet.Range("A1").Value = ActiveSheet.Range("A2").Value Then ActiveSheet.Range("A3").Interior.ColorIndex = 3Else ActiveSheet.Range("A3").Interior.ColorIndex = 4End IfWhere ColorIndex is (search in MS Excel VB reference help file):3 = Red4 = Green5 = Blue.. .and so onIf THAT is NOT what you are trying to do, please be more SPECIFIC! Link to comment Share on other sites More sharing options...
102830 Posted December 6, 2004 Author Share Posted December 6, 2004 thanks a lot! that has helped me immensly, and i have now completed the sheet and it all works accordingly, thanks again.... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now