Using external copied data as the sheet name - excel

I get data segmented into files by individual. I download the files and copy the individual's name. I want to create a macro that makes the sheet name what the copied individual's name is and after formatting it export the sheet to a PDF that is named what the sheet name is.
I've created the macro for the formatting already, just having trouble with the copied name part.

Related

Copy sheet(s) from one excel file to another excel file

I have an excel sheet that is opened and I want to copy some specific sheets from target excel file into the file that is opened.I want to have
A field to define the path of target excel file.
A field to define the name of the sheets to be copied.
A button to execute the command.
Can someone one give me source code or a place where I can get the help regarding the required functionality or best if there is file with macro.

Copy an Excel sheet and move to a new location using SSIS

I am new to SSIS, and want to check if it is possible to copy Excel Sheet and paste it in a new location.
For eg: I have an Excel named Source.xlsx which has 3 sheets ( Sheet A, Sheet B & Sheet C).
I just want to copy whole Sheet B (I don't need Sheet A & Sheet C) to another location, with a new Customized File Name.
And I have to do this for multiple Excel sheets. Like I have a Source Folder with 10 such Excel Files, I want to move the Sheet B from all those files to a new Destination folder as 10 separate Excel files with Customized names.
I hope my question was clear.
Thanks & Regards,
Pratik
You can follow below steps:
Define a Foreach container and loop through excel files
Define a Dataflow task under Foreach container, to load sheet from the excel file to excel destination.
Define a variable SheetName, which holds the sheet name and use that variable as the source in the Excel Source. Reference article
1
Now, load this data to Excel Destination. Leverage the variable created in step no. 3 and use it as the destination. Have file name as Expression. Read more on Excel destination

hyperlinks to PDF files

I have an Excel spreadsheet in which I need to make hundreds of links to PDF files that are in the same folder on my computer.
The file name for the link appears in the Excel table.
Today I create each link separately, but I'm sure there is a simpler way to tell Excel to copy the link in the top box but look for the file whose name appears in the Excel table.
I'm doing each hyperlink separably
Assuming A1 has the name of the hyperlink and A2 has the location, use this formula where you want the link to appear:
=HYPERLINK(A1,A2)
You can then copy this down to the other cells.

Excel formula with Dynamic file name static sheet name

=INDIRECT(ADDRESS(65,20,1,1,VLOOKUP(C$4,FILELOCATION,2,FALSE)&C$4&$B$2&".XLS"))
I created the formula above to pull info from a source workbook into a summary workbook. Source file name will be dynamic plus I will have 10 source files to pull into the summary workbook.
This formula works when the cell T65(65,20) is in Sheet1 of the workbook.
How do I alter the formula to pull from sheets other than Sheet1? I am trying to pull data from Sheet6 which is called Budget Export.
I don't know macros so this is why I am trying to stick with formulas.
Any suggestions?

Copying data validation from one worksheet to another in an excel workbook

Ive got three worksheets setup.
The first contains reference data for my data validation list.
The second references the first sheet for a data validation drop down list. Something like sheet1!$a1:$a3
The problem arises when I try and copy the cell in sheet two that contains the data validation drop down list to a cell in sheet 3 where the destination cell is empty.
I'm trying to copy excel data validation but when copied across to sheet 3 it references the cells $a1:$a3 but doesn't maintain the reference to sheet1 where the data for the drop down list is actually stored.
How can I copy the data validation such that when it is copied to sheet 3 it still maintains the reference to sheet1 where the static data that makes up the list is.
If I am understanding you correctly, the pasted Data Validation list is not showing the corrrect information. In my workbook I needed multiple cells of DV to display info from the sheet labled "Parts" after they were copied to the sheet labled "Ascending".
What I had to do was select my newly, and thus far incorrectly, pasted material, go to the 'Data' tab and click into 'Data Validaion --> Data Validation' (drop down menu). From here I had to edit the source to reflect the origional sheet.
Was: =$C$4:$C$21
Edit: =Parts!$C$4:$C$21
This determines what sheet the data is being validated from. Once Ive done this, I can copy and paste a DV interal to whatever sheet I am working on.
For some reason naming the range from the origional sheet (Parts) did not carry over in the pasted DV. VLOOKUP and other formulas thankfully work fine.

Resources