# Formula to subtract two numbers in cell J6

1. ## Formula to subtract two numbers in cell J6

In cell J6 there are two numbers "280 - 321" , i need a formula to subtract those numbers, with the right number first subtracting the left number?  Register To Reply

2. ## Re: Formula to subtract two numbers in cell J6

Hi Mr. Castle,

=MID(J6,FIND(" - ",J6)+2,LEN(J6))-LEFT(J6,FIND(" - ",J6)-1)  Register To Reply

3. ## Re: Formula to subtract two numbers in cell J6

Are they always three digit numbers? If so, I could see using =RIGHT(J6,3)-LEFT(J6,3).  Register To Reply

4. ## Re: Formula to subtract two numbers in cell J6

Jeff does this formula also works on time such as: "9:20 - 10:31"?  Register To Reply

5. ## Re: Formula to subtract two numbers in cell J6

Not quite, but try...

=TRIM(MID(J11,FIND(" - ",J11)+2,LEN(J11)))-TRIM(LEFT(J11,FIND(" - ",J11)-1))

then format as h:mm  Register To Reply

6. ## Re: Formula to subtract two numbers in cell J6

The formula worked,

Thank you Jeff  Register To Reply

7. ## Re: Formula to subtract two numbers in cell J6

You are very welcome and thanks for the feedback.  Register To Reply

8. ## Re: Formula to subtract two numbers in cell J6

You may need to add MOD function

Format as Custom, h:mm
Formula:  `Please Login or Register  to view this content.`

 v J K 6 9:20 - 10:30 1:10 7 9:20 - 10:37 1:17 8 9:25 - 05:45 20:20  Register To Reply