title: Excel multiple files macro - write file name to cell A1
body: <p>Is there a way in Excel to automatically write the file name of a workbook in a specific cell of the same workbook?</p>
  
  <p>I have a number of *.xlsx files in one folder. Each file has a different name (e.g. file01.xlsx, file02.xlsx, file03.xlsx etc...). I would like to run a VBA macro that in one go will a) check the file name of each .xlsx file it finds in the designated folder, b) write in cell A1 of each workbook its corresponding name without the file extension and then 3) saves it. So at the end, cell A1 of file01.xlsx will have value "file01"...</p>
  
  <p>Thank you</p>