+ Reply to Thread
Results 1 to 3 of 3

renaming field details

  1. #1
    Registered User
    Join Date
    06-08-2008
    Posts
    4

    Question renaming field details

    hi all,

    i would like to know if it's possible to copy and rename the contents of a field?

    e.g. A1 contains "Paul Smith" and I would like B1 to contain "paul_smith.txt"

    so all the contents of the one column are copied and renamed so all the letters are lower case and the spaces are changed to underscores and they're suffixed by the .txt

    thanks if anyone can help me do this

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    It can be done with a formula

    For multiple spaces use
    =LOWER(SUBSTITUTE(SUBSTITUTE(A1,".","")," ","_"))&".txt"

    for a single space use

    =LOWER(SUBSTITUTE(A1," ","_",1))&".txt"
    Last edited by mudraker; 06-08-2008 at 06:13 PM.
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Registered User
    Join Date
    06-08-2008
    Posts
    4
    hey mudraker that works great! :D
    thank you

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1