Hello everyone,
I need to sum all the numerical values (the numbers before the letter) in column A based on what letter they have. So, the result for "a" would be 3.5, "b" would be 3 etc. (as below in red)
Notes and restrictions: The only possible numerical values are :1 or 2 or 0.5. Letters can be : a, b, c, x, z. This column cannot be broken into 2 columns, one that stores letters and one that stores numbers, it all has to be in the same column.
The best I could come up with for now is something along the lines of:
=SUMPRODUCT((RIGHT(B2:B25,1)="a"), VALUE((LEFT(B2:B25,LEN(B2:B25)-1)))) - which isn't working, so this is why I need help.
What I am trying to do in the statement above is: for all the cells within Col B where the value ends with the letter "a", then sum up the (length -1) left corresponding characters (as 0.5 and 1 have varying lengths), while turning them into numbers, as they are perceived as text values.
I am not sure if I am even on the right track or my thinking might need to be revamped completely. Any help would be greatly appreciated.
[TABLE="width: 325"]
<tbody>[TR]
[TD][/TD]
[TD="align: right"]Col B[/TD]
[/TR]
[TR]
[TD]Client1
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client2[/TD]
[TD]1a
[/TD]
[/TR]
[TR]
[TD]Client3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client4[/TD]
[TD]1b[/TD]
[/TR]
[TR]
[TD]Client5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client6[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client7[/TD]
[TD]1c[/TD]
[/TR]
[TR]
[TD]Client8[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client9[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client10[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client11[/TD]
[TD]0.5a[/TD]
[/TR]
[TR]
[TD]Client12[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client13[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client14[/TD]
[TD]2b[/TD]
[/TR]
[TR]
[TD]Client15[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client16[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client17[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client18[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client19[/TD]
[TD]2a[/TD]
[/TR]
[TR]
[TD]Client20[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client21[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client22[/TD]
[TD]0.5c[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]a
[/TD]
[TD="align: right"]3.5[/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]c[/TD]
[TD="align: right"]1.5[/TD]
[/TR]
</tbody>[/TABLE]
I need to sum all the numerical values (the numbers before the letter) in column A based on what letter they have. So, the result for "a" would be 3.5, "b" would be 3 etc. (as below in red)
Notes and restrictions: The only possible numerical values are :1 or 2 or 0.5. Letters can be : a, b, c, x, z. This column cannot be broken into 2 columns, one that stores letters and one that stores numbers, it all has to be in the same column.
The best I could come up with for now is something along the lines of:
=SUMPRODUCT((RIGHT(B2:B25,1)="a"), VALUE((LEFT(B2:B25,LEN(B2:B25)-1)))) - which isn't working, so this is why I need help.
What I am trying to do in the statement above is: for all the cells within Col B where the value ends with the letter "a", then sum up the (length -1) left corresponding characters (as 0.5 and 1 have varying lengths), while turning them into numbers, as they are perceived as text values.
I am not sure if I am even on the right track or my thinking might need to be revamped completely. Any help would be greatly appreciated.
[TABLE="width: 325"]
<tbody>[TR]
[TD][/TD]
[TD="align: right"]Col B[/TD]
[/TR]
[TR]
[TD]Client1
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client2[/TD]
[TD]1a
[/TD]
[/TR]
[TR]
[TD]Client3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client4[/TD]
[TD]1b[/TD]
[/TR]
[TR]
[TD]Client5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client6[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client7[/TD]
[TD]1c[/TD]
[/TR]
[TR]
[TD]Client8[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client9[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client10[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client11[/TD]
[TD]0.5a[/TD]
[/TR]
[TR]
[TD]Client12[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client13[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client14[/TD]
[TD]2b[/TD]
[/TR]
[TR]
[TD]Client15[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client16[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client17[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client18[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client19[/TD]
[TD]2a[/TD]
[/TR]
[TR]
[TD]Client20[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client21[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client22[/TD]
[TD]0.5c[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]a
[/TD]
[TD="align: right"]3.5[/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]c[/TD]
[TD="align: right"]1.5[/TD]
[/TR]
</tbody>[/TABLE]