Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Lori
 
Posts: n/a
Default how to calculate number ranges

I am trying to calculate how many total numbers appear in a range of numbers.
The first 2 columns would have the beginning and end numbers for the range.
If there is only 1 number for the range it would appear in the first column
and the second column would be blank. (When I use the formula B1-A1+1 I get
a negative number in third column instead of a 1.)

Any help would be greatly appreciated.

1500 1504 5
1505 1
1506 1508 3
1509 1
1512 1515 4
1516 1
  #2   Report Post  
N Harkawat
 
Posts: n/a
Default

=IF(B1="",1,B1-A1+1)*ISNUMBER(A1)


"Lori" <Lori @discussions.microsoft.com wrote in message
...
I am trying to calculate how many total numbers appear in a range of
numbers.
The first 2 columns would have the beginning and end numbers for the
range.
If there is only 1 number for the range it would appear in the first
column
and the second column would be blank. (When I use the formula B1-A1+1 I
get
a negative number in third column instead of a 1.)

Any help would be greatly appreciated.

1500 1504 5
1505 1
1506 1508 3
1509 1
1512 1515 4
1516 1



  #3   Report Post  
Lori
 
Posts: n/a
Default

Thank you. This is exactly what I needed.

"N Harkawat" wrote:

=IF(B1="",1,B1-A1+1)*ISNUMBER(A1)


"Lori" <Lori @discussions.microsoft.com wrote in message
...
I am trying to calculate how many total numbers appear in a range of
numbers.
The first 2 columns would have the beginning and end numbers for the
range.
If there is only 1 number for the range it would appear in the first
column
and the second column would be blank. (When I use the formula B1-A1+1 I
get
a negative number in third column instead of a 1.)

Any help would be greatly appreciated.

1500 1504 5
1505 1
1506 1508 3
1509 1
1512 1515 4
1516 1




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for function or formula to calculate number that is revers Ken Excel Worksheet Functions 2 February 7th 05 11:18 AM
calculate number of years D L Barnard New Users to Excel 1 January 26th 05 12:19 AM
2003= negative number&2004= negative number How Do I Calculate gro Jason Excel Worksheet Functions 1 January 14th 05 05:24 PM
calculate month from week number ankman Excel Worksheet Functions 2 November 24th 04 01:27 AM
How do you calculate the nth root of a number in Excel 2003? William Excel Worksheet Functions 2 November 17th 04 04:19 PM


All times are GMT +1. The time now is 11:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"