Tom Sawkins
Tom Sawkins

Reputation: 361

CheckBox to Highlight Range Google Sheets Formula/ Google Sheets

enter image description here

I am trying to get the result in the image attached. If I check a checkBox in Column A, I want it to also to highlight the same SKU & Location Column H,I(in Bright Green). Conditional formatting or if script could do this?

Upvotes: 1

Views: 797

Answers (2)

player0
player0

Reputation: 1

try:

=REGEXMATCH($H2&$I2, TEXTJOIN("|", 1, FILTER($B$2:$B&$C$2:$C, $A$2:$A=TRUE)))

0


UPDATE:

=REGEXMATCH($H2, TEXTJOIN("|", 1, FILTER($B$2:$B, $A$2:$A=TRUE)))

Upvotes: 2

Mateo Randwolf
Mateo Randwolf

Reputation: 2930

You could simply achieve this using conditional formatting. These are the steps to follow:

  1. Select the cell that you want to highlight with the checkbox, right click on it.
  2. Go to conditional formation
  3. Under Conditional format rules -> Format rules select custom formula is under (format cells if) and below it =A2 (or the checkbox cell basically)
  4. Choose the color and press done and you will be ready!

enter image description here

Hope this has helped you, let me know if you need anything else (like an Apps Script implementation of this) or if you did not understand anything.

Upvotes: 0

Related Questions