0

I need to get the last split value from the cell.

The input cell C1 value = main\java\com\tms\vsc\ppo\data\domain\Ppo.java

which must be copied to another cell B1 Expected output in B1 is Ppo.java

Below is the formula tried over in cell B1

=RIGHT(RIGHT(C1,FIND("\",C1)),256)

and

=RIGHT(C1,FIND("\",C1))

Can anyone help me out. Its a pure excel and not VBA

Gopi
  • 909
  • 1
  • 8
  • 15

2 Answers2

0
=RIGHT(A1,LEN(A1)-FIND("|",SUBSTITUTE(A1,"\","|", LEN(A1)-LEN(SUBSTITUTE(A1,"\","")))))

Note that you must guarantee that your cell does not contain the character |

This is extracted from here: How can I perform a reverse string search in Excel without using VBA?

Community
  • 1
  • 1
romar
  • 804
  • 7
  • 17
0

You can also use:

=TRIM(RIGHT(SUBSTITUTE(A1,"\",REPT(" ",LEN(A1))),LEN(A1)))

agold
  • 6,140
  • 9
  • 38
  • 54
XOR LX
  • 7,632
  • 1
  • 16
  • 15