Link to home
Start Free TrialLog in
Avatar of spattewar
spattewar

asked on

Custom Format Excel Cells for Bond Prices

Hello experts,
I am looking for a custom format in excel that will display the fixed income bond price, which can be 104-2 as 104.0625. Basically we have to divide the number after the - by 32 and add it to the number on the left hand side of the hypen.

Can this be done? We do not want a UDF? We want something we can directly do in the excel sheet.

Thanks for your time and support.

$wapnil
Avatar of zorvek (Kevin Jones)
zorvek (Kevin Jones)
Flag of United States of America image

Since the data has a dash in it it is already a text string and thus you will be unable to use the numeric formatting options.

Your only option is to use a formula.

Kevin
One formula is:

=VALUE(LEFT(A1,FIND("-",A1)-1))+VALUE(MID(A1,FIND("-",A1)+1,9))/32

Kevin
ASKER CERTIFIED SOLUTION
Avatar of zorvek (Kevin Jones)
zorvek (Kevin Jones)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of spattewar
spattewar

ASKER

Thanks Kevin for the quick response.

I thought so but wanted to get it confirmed from a top expert :-)

$wapnil