View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Filename as Data

Range("B1").Value = left(activeworkbook.Name,len(ActiveWorkbook.name)-4)

--
Regards,
Tom Ogilvy

"Jim at SDSU" wrote in message
...
THANKS, but I forgot to mention, I want this to be part of a macro that

does
a lot of other stuff at the same time (e.g. reformats the Student ID,

inserts
the header row, inserts the Student ID title etc.)

"Tom Ogilvy" wrote:

Look at the bottom of this page for formulas.

http://www.cpearson.com/excel/excelF.htm

--
Regards,
Tom Ogilvy

"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!!!