• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Paste data from another sheet

Ananthram.Gupta

New Member
Hello Ninjas,

I have two different workbooks with one master sheet and one template and I would need to populate based on a cell C2 criteria with a button to fetch and then I would need this to export the selected range to a different sheet with the file name as (C2 + today's date). Please check and help me accordingly

For save I am below code in the module.

The code will just export it to the desired location, but I need to select a particular range and then have an export option.

Code:
Sub Filename_Cellvalue()

Dim Path As String

Dim filename As String

Path = "E:\Design\jagadish\office\Job 18-03-2019\16-03-2020\test\"

filename = Range("C2")

ActiveWorkbook.SaveAs filename:=Path & filename & Format(Now(), " DD-MMM-YYYY") & ".xlsx", FileFormat:=xlWorkbookDefault

End Sub
 

Attachments

Last edited:

Marc L

Excel Ninja
Hi,​
elaborate at least each step technically in order all should be obvious, nothing to guess …​
 

Ananthram.Gupta

New Member
Hello Marc,

I have two sheets one would be a Master sheet, which has all the data and another is Master_split list. Below given is my request.

Master_Wlist.xlsx - which needs to populate data depending on the below-given criteria.
Master_list.xls - Master sheet which has all the data.

1. Whatever value is in C2 Cell of Master_Wlist needs to be fetched from the Master Sheet.
2. Once the cell value changes on C2, the data also should dynamically change as per the C2 cell value. (works like a lookup value)
3. Export the sheet with only that selected cell range to a folder with C2 + today's Data.

I hope this would help you in understanding my requirement
 
Top