Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi All,
I need a simple macro that fill a cell of an excel sheet with some data that comes from the file name. Example: If the file name is 35.xls the cell(B,2) contains the text "35". Thanks a lot Nicola |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sub test()
Folder = "C:\temp" FName = "35.xls" Workbooks.Open Filename:=Folder & "\" & FName FNumber = Val(Left(FName, InStr(FName, ".") - 1)) Range("B2") = FNumber End Sub "nicolaux" wrote: Hi All, I need a simple macro that fill a cell of an excel sheet with some data that comes from the file name. Example: If the file name is 35.xls the cell(B,2) contains the text "35". Thanks a lot Nicola |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
passing arguments from an excel macro to a word macro | Excel Discussion (Misc queries) | |||
Macro - Open Word with Excel macro | Excel Discussion (Misc queries) |