Formula To Return Numerals Left Or Right Of A "-" Sign

glerwell

Well-known Member
Joined
Jun 25, 2006
Messages
1,082
Hi

I working with some statistics and have some data like so:

Excel Workbook
L
65-0
75-0
85-0
94-1
OVERALL OVER-UNDER


What I want is two formulas, one that will return the numerical to the left of the "-" and the other to return what is to the left of the "-" sign.

I know of LEFT and RIGHT but sometimes the data will be adouble number so they could look like this:

10-6 or 18-11

Many thanks
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
this will return what's left of the "-" in cell C7:

=LEFT(C7,FIND("-",C7)-1)

This will return what's right

=RIGHT(C7,LEN(C7)-FIND("-",C7))
 
Upvote 0
glerwell,

You could use text-to-columns with the hyphen as the delimiter. If you need the formula though, you can use the following:

For the left:
=LEFT(A1,FIND("-",A1)-1)
For the right:
=MID(A1,FIND("-",A1)+1,LEN(A1))

Hope that helps,
~tigeravatar
 
Upvote 0

Forum statistics

Threads
1,224,558
Messages
6,179,512
Members
452,920
Latest member
jaspers

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top