Trim a string???

  • Thread starter Niklas Östergren
  • Start date
N

Niklas Östergren

Hi!

I´d like to trim a string (N1546) and remove the first "N". And convert the
string to a long. Any suggestions?

TIA!
// Niklas
 
R

Rick Brandt

Niklas Östergren said:
Hi!

I´d like to trim a string (N1546) and remove the first "N". And convert the
string to a long. Any suggestions?

CLng(Mid([YourString],2))
 
R

Roger Carlson

If you are certain there is only one letter at the front, it's simple:

clng(mid(YourString, 2))
 
N

Niklas Östergren

Thank´s a lot!

Yes, I´m sure it´s only one letter in front!

// Niklas
 
Top