I am new to VBA, I am working on the task below.
nPath = "Root\zTrash - No longer needed\NOC\NOC"
I want to remove \NOCfrom nPathto display only Root\zTrash - No longer needed.
I am using this code:
=(Left(nPath, InStrRev(nPath, "\") - 1))
But I only get NOC
source
share