I am hoping to write a macro(s) to assist me in Copying named ranges from another workbook and giving the copied values a new name.
Source workbook: "WBSource" <-- where the named ranges are currently are
Destination workbook: "WBDest" --- where the named ranges need to be pasted and re-named. (this workbook to hold the macro).
Named ranges to be copy/pasted: all to be imported is on a "Table2"
I would like to be able to:
1. I manually open "WBDest"
2. Run a macro "Macro"
3. Macro asks me for the path of "WBSource", and open it
4. [Begining of LOOP] Macro Loop through "Table2", Each cell "X" contains the name of a named range that needs to be transferred from WBSource.
5. [LOOP] Macro Copy the named range "X", and paste it to "TargetSheet" Column F Below the last used Row
6. [LOOP]Turn the copied cell into a named range and name it [login to view URL] & Cell F9 value. so if X is holding "FFCost" and Cell F9 value is "_3", I want the copied item to be called "FFCost_3"
7. [LOOP END] For Next X, until we looped through all cells of "Table2" <-- Table2 is a one-column table
Below is the code I was able to come up with. As you can see I am missing the LOOP part.
Thank you in advance
On Error GoTo HandleError
[login to view URL] = False
Dim WBSourcePath As Variant
Dim WBSource As Workbook
Dim shDest As Worksheet
Dim X As Range
Set shDest = [login to view URL]("TargetSheet")
WBSourcePath = [login to view URL](, , "Locate the WBSource")
If WBSourcePath = False Then Exit Sub
Set WBSource = [login to view URL](Filename:=WBSourcePath)
For Each X In Range("Table2")
[login to view URL]("f9").Value = Range(Xname)
'MISSING ALOT HERE'
[login to view URL] False
MsgBox ("Data has been imported")
[login to view URL] = True
MsgBox [login to view URL]
41 freelancer menawar dengan rata-rata $30 untuk pekerjaan ini
Dear client I am an excel expert and I have previously carried out a number of projects in excel in the past using macros and formulas. I can complete this code for you. Kindly contact me. Roy
Hi there, I can help you to fix your issue. I am a Microsoft Certified Professional in Excel and VBA as an Expert. Awaiting your message. Regards, Karthick G.
Hi there, I can help you in your macro creation. I am excel vba expert and have years of experience in creating automations, formulas, macros. please massage me to discuss more. Regards, Ravinder
Hello, I can help you with the missing part of the code, please send me a message with the Ok and with the files as example, and I will start working on it immediately