Need help for Excel formula - If and Or

asdafgafawaaa

New Member
Joined
Jun 23, 2017
Messages
19
Hi Excel Gurus,

I'm trying to write a formula in my report as below, but it only returns error "#VALUE!".

There are the scenarios:
If the value is a number or contains "-", equals L12
If else, leave it empty.

=IF(OR(ISNUMBER(E12),FIND("-",E12)>1),L12,"")
=IF(OR(ISNUMBER(E12)="TRUE",FIND("-",E12)>1),L12,"")

Can you please explain how to make it work?

Thank you in advance!
 
Last edited:

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
The issue is that if FIND does not find anything, it returns an error.
Try this:
Code:
=IF(OR(ISNUMBER(E12),ISNUMBER(FIND("-",E12))),L12,"")
 
Upvote 0
Your first formula wont work if there is no hyphen in the number ... so basically wrap an iferror and set it to 0 if there is an error

=IF(OR(ISNUMBER(E12), IFERROR( FIND("-",E12),0)>1),L12,"")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,059
Messages
6,122,917
Members
449,093
Latest member
dbomb1414

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