Struggling With Array Formula . .

Evagrius Ponticus

Well-known Member
Joined
May 24, 2007
Messages
1,467
Hi all,

I have a column, column E, with data. Each cell in the column looks like this:
21 - 8%
5 - 21%
17 - 3%

and so forth. I am trying to add the number to the left of each cell. In my example here, I must sum 21+5+17 =

I thought I had it with this CSE but it didn't work. Thanks for any help with this.

Code:
=SUM(VALUE(LEFT(E4:E16,FIND(" ",E4:E16,1))))
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Excel Workbook
A
121-8%
25-21%
317-3%
4
543
Sheet1
Cell Formulas
RangeFormula
A5=SUMPRODUCT( --LEFT(A1:A3,SEARCH(" -",A1:A3) -1))
 
Upvote 0
may be this, with a check
Excel Workbook
A
121-8%
25-21%
317-3%
4
543
Sheet1
#VALUE!
 
Upvote 0
you need to remove the space preceding the "-"

=SUMPRODUCT( --LEFT(A1:A3,SEARCH("-",A1:A3) -1))

or

this with CSE

=SUMPRODUCT(IF(ISNUMBER(SEARCH("-",A1:A3)), --LEFT(A1:A3,SEARCH("-",A1:A3) -1),0)
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,326
Members
452,635
Latest member
laura12345

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