ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SUM of alphanumeric cells (https://www.excelbanter.com/excel-programming/444382-sum-alphanumeric-cells.html)

Why Tea

SUM of alphanumeric cells
 
How to use SUM to sum the following cells A1:A6?

10 hours
1 hour
3 hours

123 hours
5 hours

Note, row 4 (A4) is blank.

/Why Tea

AB[_2_]

SUM of alphanumeric cells
 
Can try this array* formula:
=SUM(IF(ISERROR(FIND(" ",A1:A6)),0,LEFT(A1:A6,FIND(" ",A1:A6)-1)*1))
*- array formula must be netered not with 'enter' but with Ctrl+Shift
+Enter. It'll end up with {} around it - those may not be typed.
The formula, howver, asumes that the data structure is:
- number
- space
- something else
The formula would total up all the numbers before the first space it
finds in the text.


On Mar 30, 8:22*am, Why Tea wrote:
How to use SUM to sum the following cells A1:A6?

10 hours
1 hour
3 hours

123 hours
5 hours

Note, row 4 (A4) is blank.

/Why Tea




All times are GMT +1. The time now is 12:52 PM.

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