Adding columns containing numbers with dashes
These formulas should work:
For numbers to the left of the -:
=SUMPRODUCT(--(LEFT(A1:A10,FIND("-",A1:A10)-1)))
For numbers to the right of the -:
=SUMPRODUCT(--(MID(A1:A10,FIND("-",A1:A10)+1,99)))
Adjust the range A1:A10 to meet your needs.
HTH,
Elkar
"Randi" wrote:
I have several columns (formatted as text) containing numbers with
dashes, i.e.,
20-1
15-2
30-4
05-3
Is there a way to add up the numbers separately in the column, i.e,
one total for the 20, 15, 20, 05 and one total for the 1, 2, 4, 3. If unable
to add both is it possible to add up just the numbers to the left of the
dash? Thanks.
|