Could you help me with create expression in Google Sheets to extract only numbers and sum it? I have cell with
230dr, 400dr, 450dr, 180dr, 80dr, 600dr
And I need to extract only digits to new cell and sum it.
Could you help me with create expression in Google Sheets to extract only numbers and sum it? I have cell with
230dr, 400dr, 450dr, 180dr, 80dr, 600dr
And I need to extract only digits to new cell and sum it.
If your raw data is in A2, try this in B2:
=SUM(SPLIT(A2,"dr,",1,0))
BONUS:
If you want to process an entire column (like A2:A), you can use this formula in the second cell of another column (e.g., B2) as long as there is nothing below it:
=ArrayFormula(IF(A2:A="",,MMULT(ARRAY_CONSTRAIN(SPLIT(TRIM(REGEXREPLACE(A2:A,"[^\d]"," "))&REPT(" 0",50)," ",1,1),ROWS(A2:A),50),SEQUENCE(50,1,1,0))))