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

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
50,645
Office Version
  1. 365
Platform
  1. Windows
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
 

Forum statistics

Threads
1,141,625
Messages
5,707,470
Members
421,510
Latest member
haroonstr

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
Top