0
votes

I am trying to create an array formula with IF functions to convert numeric values on a column and convert them to text into another sheet. For example, on the document Google Sheets Array Formula, on sheet "Product ID," I have from A2 - A6 different numeric values. My intention is to assign each one of those values a name and display them on the first sheet (Main) with names assigned to each numeric string.

Below, you can see the formula that I am using. It should work in theory... but, it doesn't. Does anyone know of a more practical and better way to do this?

={"My App";ARRAYFORMULA(IF(ProductID!A2:A=327939762351,"Apple - 1 mo.","0"));ARRAYFORMULA(IF(ProductID!A2:A=123456789,"Apple Store","0"));ARRAYFORMULA(IF(ProductID!A2:A=987654321,"Google Play","0"));ARRAYFORMULA(IF(ProductID!A2:A=111111111,"InAPp Purchase 1","0"));ARRAYFORMULA(IF(ProductID!A2:A=222222222,"InApp Purchase 2","0"));ARRAYFORMULA(IF(ProductID!A2:A=333333333,"InApp Purchase 3","0"))}
1

1 Answers

1
votes

try:

={"My App"; ARRAYFORMULA(IF(ProductID!A2:A="",,IFNA(VLOOKUP(ProductID!A2:A, {
 327939762351, "Apple - 1 mo."; 
 123456789,    "Apple Store"; 
 987654321,    "Google Play";
 111111111,    "InAPp Purchase 1";
 222222222,    "InApp Purchase 2";
 333333333,    "InApp Purchase 3"}, 2, 0), "0")))}

enter image description here