Tuesday, May 22, 2012

yogi_Workaround For Applying Conditional Formatting When A Cell Value Needs To Be Compared With Value In Another Cell

Yogi Anand, D.Eng, P.E.       Google Spreadsheet    Post  #551    May 22, 2012     www.energyefficientbuild.com.

user Scott DK said:
Can you do IF THEN formulas in Google spreadsheets?
I'm trying to compare cell A1 with cell A2.  If A1 is greater it turns red.  If A2 is greater it turns green.  Is this function possible in Google Docs?
The conditional formatting is sort of what I'm looking for but I want it to compare the value of the previous cell.  It looks to me as if I can only compare to a predetermined number that I set.  Is that true?

in Google spreadsheet as of now (May-2012) anyway Conditional Formatting can not be applied to a cell by comparing its value to another cell ... the cell value can be compared with a known (predetermined) value only.

So, as a workaround, I can use an adjacent column, saycolumn B wherein I can compare the value of the cells of interest and then apply Conditional Formatting to cells of corresponding rows in column B

as presented in the following solution to the problem