Related to this question about a fixed threshold but instead, I want each row in column B to be compared to the same row in column A and turn red if B>A.
I tried something like this, except that the second argument in BooleanCondition only accepts lists of hard-coded values, not grid ranges.
from gspread_formatting import *
wks = GOOGLE_WORKSHEET
rule = ConditionalFormatRule(
ranges=[GridRange.from_a1_range('B2:B26', wks)],
booleanRule=BooleanRule(
condition=BooleanCondition('NUMBER_GREATER', [GridRange.from_a1_range('A2:A26', wks).startRowIndex]),
format=CellFormat(textFormat=textFormat(bold=True), backgroundColor=Color(1,0,0))
)
Change
conditionto aCUSTOM_FORMULA: