Home > OS >  Equation invalid in conditional formatting
Equation invalid in conditional formatting

Time:04-28

I have a formula that works fine in cells but is marked as invalid when I plug it into conditional formatting; the logic of the equation however is exactly what I need. The formula is as follows:

=IF(REGEXMATCH(VLOOKUP(H2, INDIRECT("DEALS_RNG"), COLUMN(DEALS!$G$1)-COLUMN(DEALS!$A$1) 1, 0), "Likes"), Q2>=VLOOKUP(H2, INDIRECT("DEALS_RNG"), COLUMN(DEALS!$F$1)-COLUMN(DEALS!$A$1) 1, 0), R2>=VLOOKUP(H2, INDIRECT("DEALS_RNG"), COLUMN(DEALS!$F$1)-COLUMN(DEALS!$A$1) 1, 0))

What must I change in order to make the equation valid for conditional formatting?

Appreciate any help I can get with this!

CodePudding user response:

green:

=IF(REGEXMATCH(VLOOKUP(H2, INDIRECT("DEALS_RNG"), COLUMN(INDIRECT("DEALS!G1"))-COLUMN(INDIRECT("DEALS!A1")) 1, 0), "Likes"),       
 NOT(Q2>=VLOOKUP(H2, INDIRECT("DEALS_RNG"), COLUMN(INDIRECT("DEALS!F1"))-COLUMN(INDIRECT("DEALS!A1")) 1, 0)),       
 NOT(R2>=VLOOKUP(H2, INDIRECT("DEALS_RNG"), COLUMN(INDIRECT("DEALS!F1"))-COLUMN(INDIRECT("DEALS!A1")) 1, 0)))

red:

=IF(REGEXMATCH(VLOOKUP(H2, INDIRECT("DEALS_RNG"), COLUMN(INDIRECT("DEALS!G1"))-COLUMN(INDIRECT("DEALS!A1")) 1, 0), "Likes"),       
 (Q2>=VLOOKUP(H2, INDIRECT("DEALS_RNG"), COLUMN(INDIRECT("DEALS!F1"))-COLUMN(INDIRECT("DEALS!A1")) 1, 0)),       
 (R2>=VLOOKUP(H2, INDIRECT("DEALS_RNG"), COLUMN(INDIRECT("DEALS!F1"))-COLUMN(INDIRECT("DEALS!A1")) 1, 0)))

enter image description here

  • Related