Fingeldor
Fingeldor

Reputation: 495

Apply an 'if' statement to an entire column

I have the following IF statements in a cell that I want to apply to the entire column, rather than each Google Sheets cell. Right now I am copying and pasting the same code to each cell. How do I apply to this my 'I' column so that any cell in that column has this logic? I'm sure there's easier ways of doing this but I'm not good with spreadsheets.

=IF(G:G = "Wipeout", "187.50",
IF(G:G = "Glass Beach", "197.50",
IF(G:G = "Lifeguard Stand 2", "187.50",
IF(G:G = "Misty Bike", "187.50",
IF(G:G = "Sunset Surf", "187.50",
IF(G:G = "Grand Waves", "187.50",
IF(G:G = "Flight", "187.50",
IF(G:G = "Foggy Beach", "187.50",
IF(G:G = "The Cold Shore", "187.50",
IF(G:G = "Palm Tree", "187.50",
IF(G:G = "Pelican", "417.50",
IF(G:G = "Lifeguard Stand", "187.50", ""))))))))))))

Upvotes: 1

Views: 4245

Answers (2)

Ekerette Ekpo
Ekerette Ekpo

Reputation: 1

I am not sure if you have gotten the solution that you require but it would be good to have shared the data you need help with. I know that if it is the same function for an entire column, you can apply it to the first cell and then click and drag to apply to the remaining - click and drag to apply a copy across a group of cells.

Upvotes: 0

pnuts
pnuts

Reputation: 59485

With the blue array a Named Range called _nr1, in Row1 (I chose ColumnH):

=ArrayFormula(iferror(vlookup(G1:G,_nr1,2,),""))  

gives me the result indicated:

SO32534251 example

Upvotes: 2

Related Questions