I have a macro that I run daily, after the macro runs I manually go and update what I do not how to code.
Effectively there is information in a cell of a workbook, Cell G2, always G2. The thing is each week the file name changes by week number and the week number comes from Excel...
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...
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...
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...
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"...
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...
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 =...
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...
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, A3...so on...
if I get the complete...
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...
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...
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...
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...
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...
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...
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...
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...
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" &...
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...
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 MrExcel.com.
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 "mrexcel.com".
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.