Worksheet function for range of numbers

B

brendan_doc

I'm trying to find an Excel formula which will give me the total number
of entries in a range.


1-4 should provide 4
2 should provide 1
345 should provide 1
1-17 should provide 17
13-23 should provide 11

So the actual value of the number is not important but I need to return
the number in the range of values.
Any help much appreciated.
 
B

Bob Phillips

=IF(NOT(ISNUMBER(FIND("-",A1))),1,MID(A1,FIND("-",A1)+1,255)-LEFT(A1,FIND("-
",A1)-1)+1)

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)
 
Top