ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Newbie question about intervals and results (https://www.excelbanter.com/new-users-excel/44055-newbie-question-about-intervals-results.html)

Steve

Newbie question about intervals and results
 
Hey, I'm having these (hopefully simple problems) with writing in page numbers:

1. I want to write ex. "7-19" in a cell -
Then in another cell I want excel to give the "result" of the interval of,
here 12.

2. Now, if that's possible, I also want to ask this:
In one cell i want to write 2 or more different interval, ex
"7-19, 81-90".

Can I make excel understand what I'm writing somehow? And get the result of
these intervals in another cell, here 21 (12+9)

Any help will be extremely appreciated - thanks in advance, steve.

Mike

If you had 7 in one cell, minus in another cell and 19 in a third cell then
an IF statement could do the formula.

"Steve" wrote:

Hey, I'm having these (hopefully simple problems) with writing in page numbers:

1. I want to write ex. "7-19" in a cell -
Then in another cell I want excel to give the "result" of the interval of,
here 12.

2. Now, if that's possible, I also want to ask this:
In one cell i want to write 2 or more different interval, ex
"7-19, 81-90".

Can I make excel understand what I'm writing somehow? And get the result of
these intervals in another cell, here 21 (12+9)

Any help will be extremely appreciated - thanks in advance, steve.


swatsp0p


your first question is easily done thusly:

=RIGHT(A1,LEN(A1)-FIND("-",A1))-MID(A1,1,FIND("-",A1)-1)

Where A1 contains "7-19" the result will be 12 (say in cell B2)

You can repeat this sequence on multiple cells (in column A)and then
sum the cells with the results in column B.

I would not try your second option. Rather, place each component in
adjoining columns and create formulas to analyze each.

HTH


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=465395



All times are GMT +1. The time now is 05:17 AM.

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