Adding Cells that Contain Text

D

derr04

Is there anyway that I can add two cells ie.

cell 1 - (5 - Oranges)
cell 2 - (6 - Grapes)

and get a sum of 11 in the third cell...i cant just use the sum
function because of the text being in the cells
 
T

T. Valko

Assuming every cell has an entry in the format: (number - text)

=SUMPRODUCT(--LEFT(SUBSTITUTE(A1:A2,"(",""),FIND(" ",A1:A2)-1))
 
D

derr04

Hi,

You can use the sum function as follows to solve your problem:

=SUM((VALUE(LEFT(A1,1))),VALUE(LEFT(A2,1)))

cell a1 --> 5 - oranges
cell a2 --> 6 - Grapes

Hope this will clear your doubt.

Regards,
Soundar.







- Show quoted text -

Well...quite the amount of answers in the short time and I would like
to say thanks

=SUM((VALUE(LEFT(A1,1))),VALUE(LEFT(A2,1)))

this formula works great for what im trying to do, but i now run into
another problem of say I am trying to do this for cells A1 through
A100 is there a way I can specify that without having to type
VALUE(LEFT for every cell?
 
T

T. Valko

Well...quite the amount of answers in the short time and I would like
to say thanks

=SUM((VALUE(LEFT(A1,1))),VALUE(LEFT(A2,1)))

this formula works great for what im trying to do, but i now run into
another problem of say I am trying to do this for cells A1 through
A100 is there a way I can specify that without having to type
VALUE(LEFT for every cell?

Try one of the other suggestions.
 
Top