Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

if cell contains textA then numberA if another textB then numberB

$
0
0

I need to transform text in a cell to numeric value. The text is typed so I need to ingrore capitals and spaces. Ideally to use if cell contains

  • text car = 350
  • text Mobile data = 120
  • text car, mobile data = 350 + 120
  • text mobile data,car = 120 + 350

can I do that by one formula? Not by google script.

UPDATE

the final working solutin is

=350 * regexmatch(lower(A2), "car") + 120 * regexmatch(lower(A2), "mobile data")

so the replaced numbers can be summed


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>