Home > Software design >  How can I split a string and sum all numbers from that string?
How can I split a string and sum all numbers from that string?

Time:07-19

I'm making a list for buying groceries in Google Sheets and have the following value in cell B4.

0.95 - Lemon Juice 
2.49 - Pringle Chips
1.29 - Baby Carrots
9.50 - Chicken Kebab

What I'm trying to do is split using the dash character and combine the costs (0.95 2.49 1.29 9.50).

I've tried to use Index(SPLIT(B22,"-"), 7) and SPLIT(B22,"-") but I don't know how to use only numbers from the split string.

Does someone know how to do this? Here's a enter image description here

  • Related