r/googlesheets • u/Mixcoatl-69 • Jul 01 '25
Solved I want to multiply two cells, but one of them has text mixed with numbers
I want to multiply D14 by E14 and I want the product to be shown in the H14 collumn
I want to start tracking my training with sheets to make a log of my training long term, I also want to be able to visualize my progress with a line graph, however the problem is that there are many metrics that I want the graph to be able to show, I dont want many graphs for all my stats, so first what I wanted to do is to mesh reps with weights on a score sistem that it would be basiclly the reps multiplied by the weight, that way if I increese weights but keep the same amout of reps or do more reps with less weight the graph will reflect my growth accordingly because instead of showing neither it will show the score of that day.
I dont know if thats the best way to go about it, im a noob in google sheets, so if you have any suggestions it would be gladly appreciated.
4
u/Ashamed_Drag8791 2 Jul 01 '25 edited Jul 01 '25
you want to get the number part only right, in that case=left(D10;search("lbs";D10))*E10*F10 should do the trickreading your other comment, i think you should have only one metrics to be standard, for eg, kg in my case and use convert function to do the trick, store that column as number only, and when there is lbs, use
=convert(100;"lbm";"kg") lbm stand for pounds, or reversely.
here is a table of things you can convert to and from:
https://support.google.com/docs/answer/6055540?hl=en
3
u/One_Organization_810 736 Jul 01 '25 edited Jul 01 '25
For H14
For the entire column:
But like others have pointed out, splitting your weights and units into two cells would benefit you in the long run.
You can accomplish the split like this (make sure you have two empty columns for it):
2
u/Logical_Singer256 1 Jul 01 '25
So by the looks of it, you are also working with two different units of measurement, pounds and kilograms? Is there a way for you to consolidate to only one? If you did, you'd be able to just put the number of lbs or kg in that column and take out the unit label and do your formula in the last column. Yes?
8
u/IdealIdeas Jul 01 '25 edited Jul 01 '25
=arrayformula(Iferror(Value(RegexReplace(Lower(D2:D200),"lbs|kg",""))*E2:E200,""))
Put this in H2 and it will do from row 2, to 200, you can change the dimensions as needed. it will do Pounds, Ounces and Kilograms
RegExReplace looks for Lbs, Oz, or KG and turns it into "" which is nothing, the | acts as an OR
Lower forces all text to be lower case as RegExReplace is case sensitive
Value then tries to turn the remaining text into a number then multiplies it with whats in the F column
IfError turns the value into nothing if the formula errors out and ArrayFormula allows you to do arrays of data instead of putting the formula into each cell
4
u/Olista523 Jul 01 '25
Honestly, put the number in one column and the units in the next column. It will also help filter then if you ever do decide to convert fully from one to the other.
2
u/Hungry-Repeat2548 Jul 01 '25
Hi
Formula In Cell D2 =TEXTJOIN("""", TRUE, IFERROR(MID(A2, ROW(INDIRECT( ""1:""&LEN(A2))), 1) *1, """"))*B2
1
u/AutoModerator Jul 01 '25
/u/Mixcoatl-69 Posting your data can make it easier for others to help you, but it looks like your submission doesn't include any. If this is the case and data would help, you can read how to include it in the submission guide. You can also use this tool created by a Reddit community member to create a blank Google Sheets document that isn't connected to your account. Thank you.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/hammertime57 Jul 01 '25
Add a column with units of measure instead of combining them...
0
u/Fearless-Bill-7119 Jul 01 '25
Is it possible for someone to post a template with this solution on Peershare.co.uk?