Formula to sum total numbers with dashes in them

  • Thread starter Thread starter mikeburg
  • Start date Start date
M

mikeburg

Need formula in cell D20 to sum total numbers with dashes in them. For
example:

In cells D7 thru D16
D16 | 450-33-6320
D17 | 83-0381086
D18 | 459-15-6027
D19 | 75-2708781

In cell D20 | 2,492,582,214 Control total

Thanks a million, mikeburg
 
=SUMPRODUCT(--(SUBSTITUTE(D16:D19,"-","")))

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)
 
Need formula in cell D20 to sum total numbers with dashes in them. For
example:

In cells D7 thru D16
D16 | 450-33-6320
D17 | 83-0381086
D18 | 459-15-6027
D19 | 75-2708781

In cell D20 | 2,492,582,214 Control total

Thanks a million, mikeburg

The **array** formula:

=SUM(--SUBSTITUTE(D16:D19,"-",""))

To enter an array formula, hold down <ctrl><shift> while hitting <enter>.
Excel will place braces {...} around the formula.

If blank cells may be in the range, then use this *array* formula instead:

=SUM(--SUBSTITUTE(0 & rng, "-",""))


--ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top