Error .... but why?

ChrisEngland

New Member
Joined
Nov 7, 2018
Messages
3
Hi,

Hope someone out there can help. I keep getting an error message but I don't understand why.

I have a formula is cell B3 which is =IF(FIND("",A3,1),MID(A3,4,99),A3)

Cells in column A will contain a string which starts with xx\ or just yyyyyyyy

What I was hoping the formula would do was if the contents of the cell contained a \ would simply put from char position 4 to the end of the string into cells B3, if not it would copy cell A3 to B3

What I'm getting is correct is there is a \ in cell A3 but if not I get a #Value ! error

If I simply type =A3 into B3 excel does just that and copies contents of A3 into B3

What's going wrong?

TIA

Chris
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
FIND implies the text to search for WILL be in the searched cell, if it's not there you'll get an error

=IF(ISNUMBER(FIND("",A3)),MID(A3,4,99),A3)
 
Last edited:
Upvote 0
Aren't you looking for a backslash?

=IF(ISNUMBER(FIND("\",A3)), ...
 
Upvote 0
Based on your description, if the \ was present in the string it would be the 3rd character, so why not just look for that?

=IF(MID(A3,3,1)="\",MID(A3,4,99),A3)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,577
Messages
6,131,510
Members
449,654
Latest member
andz

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