# Help with existing formula

#### spectraflame

##### Well-known Member
The following formula is in an existing spreadsheet that I need to better understand. I think this formula is searching a specific cell to look for a "/". When it is found, it subtracts the number to the left of the slash from the other number.

=IF(ISERROR(FIND("/",D19)),0,MID(D19,FIND("/",D19)+1,255)-LEFT(D19,FIND("/",D19)-1))

What I do not understand is what 1,255 is and what is for. When I key in 55/100 in cell D19, the result is 45. Just do not understand why 1,255 is necessary.

### Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

#### 63falcondude

##### Well-known Member
It isn't +1255. It is +1 comma 255. The 255 is the max number of characters to return.

That being said, I believe that you can make an easier formula such as

=RIGHT(D19,FIND("/",D19))-LEFT(D19,FIND("/",D19)-1)

#### spectraflame

##### Well-known Member
Thank you for the simplified explanation and alternative.

#### 63falcondude

##### Well-known Member
Thank you for the simplified explanation and alternative.

#### bolony21

##### New Member
Yes basically it is looking for the position of the "/" in d19.

Then uses the +1 to start from the next character to the right of the "/" and returns up to 255 characters.

Looks like you got sorted anyway.

Replies
9
Views
2K
Replies
6
Views
385
Replies
1
Views
413
Replies
3
Views
7K
Replies
6
Views
361

1,190,627
Messages
5,982,011
Members
439,751
Latest member
megaman777

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back