Extract and sum parts of strings in cells

Formula11

Active Member
Joined
Mar 1, 2005
Messages
468
Office Version
  1. 365
Platform
  1. Windows
Is this possible with Excel formula (not Visual Basic).

Extract first number in blue cells and divide by second number.
Sum cells.


Output would be sum(0.25/0.025, 0.5/0.1, 0.4/0.02) = 35.

Number of cells is a variable.



1695798707844.png
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
try this:
Mr Excel Akbarov.xlsx
AB
1
2(T)*(0.25)*(d/0.025)35
3(T)*(0.5)*(d/0.1)
4(T)*(0.4)*(d/0.02)
formula11
Cell Formulas
RangeFormula
B2B2=SUM(TEXTAFTER(TEXTBEFORE(A2:A4,")",2),"(",2)/TEXTAFTER(TEXTBEFORE(A2:A4,")",3),"/"))
 
Upvote 0
Solution
I am happy you found a solution. Thanks for the feedback.
Best Wishes!
 
Upvote 0
Is it possible to increase complexity of this awoohaw.

For the example below, I tried the formula, but doesn't work.
Excel Formula:
=SUM(TEXTAFTER(TEXTBEFORE(A2:A4,")",2),"(",2)/TEXTAFTER(TEXTBEFORE(A2:A4,")",3),"/"))
+SUM(TEXTAFTER(TEXTBEFORE(A2:A4,")",5),"(",5)/TEXTAFTER(TEXTBEFORE(A2:A4,")",6),"/"))

The issue I think is referencing the second "/".


1697462694260.png
 
Upvote 0
So, a couple things I think are wrong.
You didn't repeat the formula exactly on the 3rd row of the new question as you did in the first two rows.
Secondly, you needed to indicate you seek the second "/" for the second part of the formula.

Mr excel questions 67.xlsm
ABCDE
1
2Original QuestionSpillSum
3(T)*(0.25)*(d/0.025)103510=0.25/0.025
4(T)*(0.5)*(d/0.1)55=0.5/0.1
5(T)*(0.4)*(d/0.02)2020=0.4/0.02
6
7
8Subsequent Question
9(T)*(0.25)*(d/0.025) + (T)*(0.25)*(d/0.025) 205520=0.25/0.025 + 0.25/0.025
10(T)*(0.5)*(d/0.1) + (T)*(0.5)*(d/0.1)1010=0.5/0.1 + 0.5/0.1
11(T)*(0.4)*(d/0.02) + (T)*(0.5)*(d/0.1)2525=0.4/0.02 + 0.5/0.1
Sheet1 (2)
Cell Formulas
RangeFormula
B3:B5B3=TEXTAFTER(TEXTBEFORE(A9:A11,")",2),"(",2)/TEXTAFTER(TEXTBEFORE(A9:A11,")",3),"/")
C3C3=SUM(TEXTAFTER(TEXTBEFORE(A9:A11,")",2),"(",2)/TEXTAFTER(TEXTBEFORE(A9:A11,")",3),"/"))
E3:E5,E9:E11E3=FORMULATEXT(D3:D5)
D3D3=0.25/0.025
D4D4=0.5/0.1
D5D5=0.4/0.02
B9:B11B9=TEXTAFTER(TEXTBEFORE(A9:A11,")",2),"(",2)/TEXTAFTER(TEXTBEFORE(A9:A11,")",3),"/") +TEXTAFTER(TEXTBEFORE(A9:A11,")",5),"(",5)/TEXTAFTER(TEXTBEFORE(A9:A11,")",6),"/",2)
C9C9=SUM(TEXTAFTER(TEXTBEFORE(A9:A11,")",2),"(",2)/TEXTAFTER(TEXTBEFORE(A9:A11,")",3),"/") +TEXTAFTER(TEXTBEFORE(A9:A11,")",5),"(",5)/TEXTAFTER(TEXTBEFORE(A9:A11,")",6),"/",2))
D9D9=0.25/0.025 + 0.25/0.025
D10D10=0.5/0.1 + 0.5/0.1
D11D11=0.4/0.02 + 0.5/0.1
Dynamic array formulas.
 
Upvote 0
Thanks again awoohaw, it was indicating for the second "/" which was the issue, now resolved.
Cheers.
 
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,139
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top