Left Numbervalue

creative999

Board Regular
Joined
Jul 7, 2021
Messages
85
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. MacOS
Hi

I need to pull out the number values from various sheets. I thought i could use something like this to pull out the first two numeric values (1-10)

NUMBERVALUE(LEFT(Sheet1!H2,2).

However, the problem is that some cell values contain a hyphen immediately after the number, ie '4-Start', '9-Good', '10-Complete' and using the formulae above doesnt work. I cant just pull the first numeric value as there could be a '10'.

How do i get around this and get the numeric value with our without a hyphen in the originating cell?
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Hi, you could try like this..

Excel Formula:
=NUMBERVALUE(LEFT(Sheet1!H2,FIND("-",Sheet1!H2&"-")-1))
 
Upvote 0
Try this:

=--LEFT(Sheet1!H2,FIND("-",Sheet1!H2)-1)

Or:

=LOOKUP(99,--LEFT(Sheet1!H2,{1,2}))
 
Upvote 0

Forum statistics

Threads
1,215,263
Messages
6,123,956
Members
449,135
Latest member
jcschafer209

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