An "ISNA" function for #value! ?

Rebam98

Board Regular
Joined
Sep 28, 2004
Messages
55
Hi,

Is there a function that works like "isna" does for the N/A error but for #value?

I'm doing a search on a column to look for a hyphen within a string of text. Anything before that hyphen I want to extract. The problem is not all strings have a hyphen. Therefore, when I do a search for the hyphen, it returns, "#value!". I'd like to write an "if" statement looking for the "#value!" and have it make a decision on if #value! is true or not.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Rebam98

Here a couple of options you might consider. If this is not what you meant, post back with more details.

B1 (copied down): =IF(ISNUMBER(FIND("-",A1)),LEFT(A1,FIND("-",A1)-1),A1)
C1 (copied down): =LEFT(A1,FIND("-",A1&"-")-1)
Mr Excel.xls
ABCD
1What about - this?What aboutWhat about
2no hyphenno hyphenno hyphen
3sub-totalsubsub
4
Search Hyphen
 
Upvote 0

Forum statistics

Threads
1,214,978
Messages
6,122,549
Members
449,089
Latest member
davidcom

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