Add an IF to an arrayformula in Google Sheets

Viewed 43

I have a simple one that is driving me nuts.
I have a long list of NPS scores and I need to create a new column and add the following formula.

=if(A3<=6,"Detractor",if(A3>=9,"Promoter","Neutral"))

It works great if I drag to the bottom but I can't always do that and need to use an arrayformula but I'm pulling out what hair I have left trying to make it work :(

2 Answers

try:

=ARRAYFORMULA(IF(A3:A<=6, "Detractor", IF(A3:A>=9, "Promoter", "Neutral")))

or advanced:

=ARRAYFORMULA(IF(A3:A="",, IF(A3:A<=6, "Detractor", IF(A3:A>=9, "Promoter", "Neutral"))))

You should change your single cell to an array of cells

=ArrayFormula(IF(LEN(A3:A)>0,(IF(A3:A<=6,"Detractor",IF(A3:A>=9,"Promoter","Neutral"))),""))
Related