Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Excel Macros

  1. Mar 14, 2007 #1
    I'm trying to read in a file's filename and append part of the filename to a certain range of cells. This is to say if the filename was "ABC12X.txt"
    and another filename was "ABC13X.txt", then how could I obtain the values "12" and "13" given the filename information alone? Thanks
  2. jcsd
  3. Mar 15, 2007 #2
    Do some string manipulations i guess...I forgot my vb :(
  4. Mar 15, 2007 #3
  5. Mar 27, 2007 #4


    User Avatar
    Homework Helper

    If what you are trying to extract is always the 4th-5th characters, you can use the mid function:

    If you need addition help, the 'Office Development' forum within the following VB forum is great:


    Good luck. :smile:
    Last edited: Mar 27, 2007
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook