View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_7_] Bob Phillips[_7_] is offline
external usenet poster
 
Posts: 1,120
Default Filename as Data

=MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)+1,FIND("]",CELL("fi
lename",A1),1)-FIND("[",CELL("filename",A1),1)-5)

--
HTH

Bob Phillips

"Jim at SDSU" <Jim at wrote in message
...
Does anyone know of a simple way to insert the file name (less extension)

as
data in a particular cell?
I have data that is exported froma test grading program as comma separated
data. I open it in Excel to format so it can be imported into another
program. The test scoring program exports the student ID and a test score.
The idea is to name the exported file as "Quiz 1.txt" then use the macro

to
insert "Quiz 1" as the "B:1" cell of the score column.

THANKS!!!