Trim a string???

  • Thread starter Thread starter Niklas Östergren
  • Start date 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
 
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))
 
If you are certain there is only one letter at the front, it's simple:

clng(mid(YourString, 2))
 
Thank´s a lot!

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

// Niklas
 
Thank´s a lot!

// Niklas

Rick Brandt said:
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))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top