file name

  1. E

    Vlookup with file path in table array

    Hi, this is the vlookup I currently have (that works) VLOOKUP(F2,'\\documents\August\[File Name 30.08.22.xlsm]Sheet 1'!$F:$Z,21,0) The issue is that everyday I have to reset the formula with the prior working day so that it's pulling through the latest comments. I'm trying to create a static...
  2. M

    Vba - Save .txt file in Excel format, while keeping the orginal name?

    Hi, I'm trying to find a way to add a ''save'' function at the end of my macro to save my file in Excel format (originally a .txt file), while keeping the same name the .txt had. I was able to either do one or the other (Excel file that didn't retain the original name, or text file with the...
  3. T

    Save As under specific File Name

    Hi All, I'm trying to create a copy of a file and then save it by using certain text/values within a workbook. The first value is text and the second value is the date but it needs to be in the format "yymmdd". The file should be written as so "SXB220620" Can anyone help? Sub...
  4. S

    Define As String variably using If & ElseIf

    Hi there experts! I have a preexisting VBA code to create and submit data files into a Snowflake Data Warehouse. Now, they'd like me to change the data file names to have a version suffix, to differentiate files in case we need to resubmit them during the month. For example "..._01", "..._02"...
  5. M

    Need to make multiple copies of shift report with different dates in the name of the xlsx file.

    I am a lead maintenance mechanic and trying to figure out how to create dated shift reports. Our naming system is (Master file is named "Shift Report.xlsx") Shift Report 7-16-2021 D1 Shift Report 7-16-2021 N1 Shift Report 7-17-2021 D1 Shift Report 7-17-2021 N1 etc... I have to generate these...
  6. A

    Copy File Name Into Sheet

    Hi I have part of my macro pasted below. The problem I'm having is I'm getting the full path name of the file, which is not what I want. How can i get ONLY the file name itself pasted into cell A1? Set Wbk1 = ActiveWorkbook Fname = Application.GetOpenFilename Set Wbk2 =...
  7. VBE313

    File Name and Path refer to cells

    Is there a way to change the path name depending on what the user types in? I know you can do that with the file name.
  8. C

    Create Macro to Save Active Sheet as PDF and save with in a Specific File Path

    Hi I am trying to create a macro that picks up the file path that is entered on my Spreadsheet and save it as a PDF with in this File Path along with a specific file name: The File Path is below - I need it to go to R1\R2\R3 (S:\Finance\F19\03 SEP 2018) <tbody> Q R 1 File Path S:\Finance...
  9. H

    File names to excel from respective folders

    Hi All, I am working on some automation and need your help in vba code to get excel file names from respective folders......for example ..I have 10 different folders and need the file names those were inside the folder to excel cell starting from A1, A2, on... if I get the complete...
  10. A

    Run macro w/ relative reference for File name (changes monthly)

    Each month I update/change the file name and have had do manually go in and edit all macros. Is there a way to avoid this? Also, from what I've seen online, many recommend using "ActiveWookbook" or something similar....this will not work for me as I have macros pulling from multiple workbooks at...
  11. I

    SaveAs ilename in Current Directory

    I'm having trouble with the following code. It works perfectly, except that it adds the name of the parent folder at the beginning of the SaveAs filename. The SaveAs file name should be "ParsedInfoData.xlsx", but it is saving as "ParsersParsedInfoData.xlsx". The name of the folder these files...
  12. B

    Combining Files with File Name

    Hi, I have built a VBA macro to combine multiple Excel files into one sheet, format the contents and then do some calculations. However, it would be really useful to have the original file name against each row in the combined sheet. For example, I could see that rows 1-20 came from Sheet A...
  13. E

    Set Const as a dynamic/variable date

    Hello, I have the following code that works well. It searched for a file saved with the most recent date in the file name and opens it. Sub Test() '---Opens a sheet based on date, searches backward from today til it finds a matching date Dim dtTestDate As Date Dim sStartWB As String...
  14. W

    Need a macro to work on any filename

    I have several macros in my Personal Wrkbook. They all do different tasks but look for the file named aging.xls I run different reports and didnt want to give each one a different file name, which is why I name any file I export from our accounting system 'aging' Although this technique works...
  15. S

    only numbers from the file name.

    My filename is like this e.g. abc-253-sffdd.xlsm. I want only the number from the filename as my return value. in the above example I would like my return value to be 253. In below example. drvd951sdfdfd.xlsm is my file name. the return value should be 951. Whatever number is there in the...
  16. weiser386

    Saving an exported chart as the current date file name

    I'm trying to export a screenshot with my macro and I'd like it to save as a date and time format...I think I'm some what close but I need help. Thank you in advance Sub CopyRangeToGIF() ' save a range from Excel as a picture Dim rng As Excel.Range Dim cht As Excel.ChartObject Dim FName As...
  17. M

    Copy and Paste from Excel to Notepad, then Save with Specific Filename

    Hi! I'm working on a program in VBA that requires copying and pasting from Excel to Notepad, and I could use a little help. In another method in the same worksheet, a program automatically generates the contents of a sheet, x amount of cells at a time (it's not fixed, it's based on user...
  18. A

    Paste file name and extension using file explorer

    See code below.... Sub GetFilePath()Set myFile = Application.FileDialog(msoFileDialogOpen) With myFile .Title = "Choose File" .AllowMultiSelect = True If .Show <> -1 Then Exit Sub End If For I = 1 To .SelectedItems.Count Range("K" &...
  19. S

    Macro to save file with its current name but in a different, specified location

    Hey guys - struggling here. I have a macro and I want to end it with saving the file in a specified location - not the current location where I am opening the file from. When I use this macro again, it will always need to be saved at that specified location. However, I want to save it as the...
  20. M

    importing file name to cell

    Hi all, Hopefully this will be an easy one for you guys although I can't find a solution anywhere. I have a simple macro which imports various data from RAW excel files and cleans it into a separate excel sheet. Sub importpart2() Application.ScreenUpdating = False '' SETUP...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back