Skip to main content

Objective: I want to return a number if a cell has a certain text in it and then multiply that number by another number to return a total value


For example: If Content Type Column says TikTok then return number 30.


However when I use the Switch function like this:


SWITCH(({Select}),

“UGC - TikTok”, “30”,

“UGC - Review”, “25”,

“UGC - How To”, “20”

)


It shows a number but isn’t recognised as a number, therefore I am unable to multiply it against another column/variable to measure total cost.


E.g. 30 * 5 (no of videos) = $150


dContent type cost] * No of videos] = #ERROR!


How to solve?

Welcome to the community, @Ryan_Thorpe!


You’ll need to remove the quotation marks from your numbers.


Welcome to the community, @Ryan_Thorpe!


You’ll need to remove the quotation marks from your numbers.


Oh my, I just remembered VALUE() exists. And this might actually be a use case for it (assuming the quotes and the numbers are coming from the same field, it would be more convenient to drag them through VALUE than fiddle with index numbers or regex.


Reply