Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Extract Characters


I am trying to Extract characters out of a string and
include them in a file name by using

Dim sName As String
sName = (Left(B1, 3) & Right(B1, 2))

But this does not work.

Any ideas as to what is wrong?

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Extract Characters

sName = (Left(range("B1"), 3) & Right(range("B1"), 2))

or better:

Function sName (rngS as range) as string 'or variant
Dim sName As String
sName = (Left(rngS, 3) & Right(rngS, 2))
end Function

Stephen Rasey
Houston
http://excelsig.org
http://wiserways.com


"Jack S" wrote in message
...

I am trying to Extract characters out of a string and
include them in a file name by using

Dim sName As String
sName = (Left(B1, 3) & Right(B1, 2))

But this does not work.

Any ideas as to what is wrong?

Thanks




  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Extract Characters


-----Original Message-----
sName = (Left(range("B1"), 3) & Right(range("B1"), 2))

or better:

Function sName (rngS as range) as

string 'or variant
Dim sName As String
sName = (Left(rngS, 3) & Right(rngS, 2))
end Function

Stephen Rasey
Houston
http://excelsig.org
http://wiserways.com


"Jack S" wrote in

message
...

I am trying to Extract characters out of a string and
include them in a file name by using

Dim sName As String
sName = (Left(B1, 3) & Right(B1, 2))

But this does not work.

Any ideas as to what is wrong?

Thanks




.
Thanks for your help.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
extract last 2 characters from the right? Pierre Excel Worksheet Functions 8 December 21st 09 09:37 PM
Extract characters from Right of string ashg657 Excel Worksheet Functions 5 July 30th 09 11:16 AM
Extract characters from a cell JBasch Excel Discussion (Misc queries) 2 March 10th 06 02:27 AM
Extract the first few characters MC_blur Excel Worksheet Functions 6 January 13th 06 05:18 PM
HOW DO I EXTRACT ALL CHARACTERS AFTER 5 CHARACTERS ON LEFT GRYSYF Excel Worksheet Functions 5 October 12th 05 10:58 AM


All times are GMT +1. The time now is 08:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"