Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-07-2019, 08:39 AM
Jelmer Jelmer is offline Create new workbooks from template based on sheet with data Windows Vista Create new workbooks from template based on sheet with data Office 2016
Novice
Create new workbooks from template based on sheet with data
 
Join Date: May 2017
Location: Netherlands/UK
Posts: 15
Jelmer is on a distinguished road
Default Create new workbooks from template based on sheet with data

I have been searching the web and I found several answers in the right direction but since I'm not a master in VBA I was not able to figure it out.
I have an Excel sheet with data which is an export of a library in SharePoint. I need to be able to filter this data and make changes where required and then use the visible data to create new workbooks based on a template called 'CRS Template' and save them as .xlsx. This needs to be done for each visible row with data.
My idea is to have a workbook called 'CRS Data Input' with on sheet 'Create CRSs' a button to activate the VBA code so I can make the required changes in the second sheet (let's call it 'Data') where I will copy and paste the data from the export from SharePoint.
Then, what the code needs to do for each row is as follows:
  • create new workbook from 'CRS Template'
  • copy data from column B in 'Data' to cell K1 in this new workbook (this is a hyperlink to a file in SharePoint and should still work)
  • copy data from column F in 'Data' to cell N1 in this new workbook
  • copy data from column E in 'Data' to cell K2 in this new workbook
  • copy data from column I in 'Data' to cell K3 in this new workbook
  • save the new workbook as .xlsx with as filename the value in cell K1 with '-CRS' attached to it. So if K1 has 'test' in it, the filename with extension would be test-CRS.xlsx. I would like to save these workbooks in a folder 1 level below the folder in which the 'CRS Data Input' is stored (so using ThisWorkbook.Path & ..\ I guess?)
I think what I want is possible but I just can't figure it out how to do it exactly...



Any help would be very much appreciated!
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy data from one sheet to another based on a certain criteria shina67 Excel Programming 2 12-28-2016 07:32 AM
Create new workbooks from template based on sheet with data Mailmerge create a coloured box based on data haydencohen Mail Merge 1 11-25-2015 03:32 PM
Create new workbooks from template based on sheet with data Create custom quote based on template torma156 Word 3 09-06-2015 11:04 AM
Create new workbooks from template based on sheet with data Create a Bar with a slider that move based on data jgallet Excel 8 08-21-2015 03:41 PM
How to create a data validation based on another cell's value?? cfreezy Excel 1 06-18-2015 09:51 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:13 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft