Boomer Rang
Boomer Rang

Reputation: 1

formatting a column based on its column header (Google Sheets)

I am trying to use conditional formatting on a range of data in Google Sheets. I want any given column's formatting to depend on its column heading, which is either a number between 1-5 or the word "banned" (I run a consignment store and I'm updating my price book - the numbers represent how many prices I have found for a given type of clothing of a particular manufacturer). The relevant information for the condition is in row 2.

For example, in the screenshot, I'd like columns G&J to be one colour, K&N another, H,I&M a third, and L a fourth. The specific colours don't matter; I just want them to be different.

screenshot of the relevant sheet

I tried using conditional formatting where I selected the full range (g2:ab34) and went to conditional formatting. Once there, I selected "custom formula" and entered g$2=1, and chose a colour. (I'm testing if the formula works before I expand it to the other conditions) The colours did not change, though I was expecting columns G and J to change.

I also tried to use the formula =search (g3,g$2) but it highlighted values throughout the range (including other columns) based on a criterion I don't understand using the =search() formula

Upvotes: 0

Views: 51

Answers (0)

Related Questions