I'm trying to write a formula that will try to find a value in a lookup table and if no value is found to use a default value.
I tried to combine a condition formula with a lookup but nothing really worked for me.
Thanks in advance!
Best Answer
G
Gibson Cabello
said
over 5 years ago
Hi Matan,
Thanks for reaching out! I came up with a formula that I think will work on your desired output.
Syntax: (lookup_formula).blank? ? "Value if Blank": (lookup_formula)
This formula will get the value in the lookup table then if the value was not found on the lookup table, it will return the string "Value if Blank". Hence, it will just return the value found on the lookup table.
Hope this helps!
Let me know if you have further questions.
Answer
Gibson Cabello
said
over 5 years ago
Hi Matan,
Thanks for reaching out! I came up with a formula that I think will work on your desired output.
Syntax: (lookup_formula).blank? ? "Value if Blank": (lookup_formula)
This formula will get the value in the lookup table then if the value was not found on the lookup table, it will return the string "Value if Blank". Hence, it will just return the value found on the lookup table.
Hope this helps!
Let me know if you have further questions.
Amanda Wong
said
over 5 years ago
You could also just use an 'or' formula. It reads from left to right and takes the first value if first value is not null. Otherwise, it takes the second value.
Matan Alon
trying to write a complex formula - lookup
Hi,
I'm trying to write a formula that will try to find a value in a lookup table and if no value is found to use a default value.
I tried to combine a condition formula with a lookup but nothing really worked for me.
Thanks in advance!
Hi Matan,
Thanks for reaching out! I came up with a formula that I think will work on your desired output.
Syntax: (lookup_formula).blank? ? "Value if Blank": (lookup_formula)
This formula will get the value in the lookup table then if the value was not found on the lookup table, it will return the string "Value if Blank". Hence, it will just return the value found on the lookup table.
Hope this helps!
Let me know if you have further questions.
Gibson Cabello
Hi Matan,
Thanks for reaching out! I came up with a formula that I think will work on your desired output.
Syntax: (lookup_formula).blank? ? "Value if Blank": (lookup_formula)
This formula will get the value in the lookup table then if the value was not found on the lookup table, it will return the string "Value if Blank". Hence, it will just return the value found on the lookup table.
Hope this helps!
Let me know if you have further questions.
Amanda Wong
You could also just use an 'or' formula. It reads from left to right and takes the first value if first value is not null. Otherwise, it takes the second value.