PDA

View Full Version : Remove last few characters from a string



arrun
10-08-2012, 11:45 AM
Hello all, I am looking for some VBA/Excel function which will eliminate last few characters from a given string. For example, suppose the given string is "abcde". I want something like:

function("abcde", 3) = "ab"
function("abcde", 2) = "abc"

etc.

Can somebody help me with some pointer?

Thanks and regards,

mancubus
10-08-2012, 12:39 PM
hi.

does not LEFT function work for you?

same results:
=LEFT("abcde", 2)
=LEFT("abcde", 3)