ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Adding Cells that Contain Text (https://www.excelbanter.com/excel-discussion-misc-queries/161907-adding-cells-contain-text.html)

[email protected]

Adding Cells that Contain Text
 
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


Soundar

Adding Cells that Contain Text
 
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

so that you will get 11 as result.

Hope this will clear your doubt.

Regards,
Soundar.


" wrote:

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



Kevin B

Adding Cells that Contain Text
 
This would work, as long as there's a space between the value on the left and
the hyphen:

=VALUE(LEFT(A1,FIND(" ",A1,1)))+VALUE(LEFT(A2,FIND(" ",A2,1)))
--
Kevin Backmann


" wrote:

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




All times are GMT +1. The time now is 07:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com