I did a google form of items I'm selling, and the form is linked to a google sheet. I want to extract the prices and add them in a separate column.
In the entries I have the price and name of the item, but I want to add only the prices in the next column.
I was using:
=VALUE(RIGHT($D2, 4))
but that will only extract the price when there is one item.
Any information will be helpful!
CodePudding user response:
SUM() doesn't care about text so you should be able to do:
=SUM(SPLIT(D2," ,$"))
CodePudding user response:
Try
=sum(split(join("|",REGEXEXTRACT(substitute(A1,"$",""),REGEXREPLACE(substitute(A1,"$",""),"(\d .\d )","($1)"))),"|"))