calculate a cell with letters and numbers in it.

2k05gt

Board Regular
Joined
Sep 1, 2006
Messages
151
= SUM(B2, B12, B21, B32, B40, B49, B52, B57, B73, B83, B87, B104, B114, B118, B124, B128, B142, B149, B162)

each cell looks like ## interfaces
I need a total of all ## and exclude the text. Can this be done?
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
A bit difficult to do with a single formula

Is it possible to change your data so that each cell contains just a number but you custom format as

0 "interfaces"

so that they display as ## interfaces

you can then just use your SUM formula to sum the values
 

2k05gt

Board Regular
Joined
Sep 1, 2006
Messages
151
I tried using countif (Left, 2) but am having trouble with this as well
I can't change the cells since the data is updated from a flat file.
 

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
How many digits will the numbers have?

If there is a space between the number and "interfaces" then you can use this formula to extract the number, whatever the number of digits

=LEFT(B2,FIND(" ",B2)-1)+0

you could put this formula in another column and then sum that......
 

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
Another option....

what's in the intermediate cells, B3, B4 etc.?

Assuming these won't contain the word "interfaces" then perhaps you can use this formula

=SUM(IF(RIGHT(B2:B162,10)="interfaces",LEFT(B2:B162,FIND(" ",B2:B162)-1)+0))

confirmed with CTRL+SHIFT+ENTER
 

Forum statistics

Threads
1,136,597
Messages
5,676,719
Members
419,647
Latest member
usas12gthr

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
Top