Problems with the Right & Find functions
I did have one cell that only had one name in it, and I got the value error.
I had thought that I just might force the hyphen at the front of the name to
make the formula work. Now I understand why I got the error.
Thanks for explaning it to me.
Steve
"Peo Sjoblom" wrote:
That is a way to fend off empty cells or cells that don't have any hyphens
or else you will get value errors if the hyphen is not found
It is more efficient to use the mid and find than to use right len and find
--
Regards,
Peo Sjoblom
"beginner here" wrote in message
...
What Dave has given out, seems to work in all cases in my workbook.
But since I am trying to learn, is to much to ask about your function. I
understand the first part of it, up to the "A1&. From then on I lose you.
Steve
"T. Valko" wrote:
The "problem" is that Excel's logic is built to go from left to right.
Try it like this:
=MID(A1,FIND("-",A1&"-")+1,255)
--
Biff
Microsoft Excel MVP
"beginner here" wrote in message
...
I am having probems with combining both the right and the find function
command.
My formula is: =TRIM(RIGHT(A1,FIND("-",A1,1)-1))
Say in cell A1 to A3 I have the following combination of names.
A1=Steve-Caldog, A2=Tom-Jones,A3=April-Showers
My results are the following in B1 through B3:
B1=aldog
B2=nes
B3=owers
Now the formula I have kepted the same for all three examples above.
What am I doing wrong? In my situation, I can have any number of
combinations. I would like one formula so that I can see in all cases
is
just the complete second name after the hypen.
|