[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 373
  • Last Modified:

Excel 2010 macro

I need help in building an excel macro where the template file and report file are in specific locations.
The template file should get data populated from the report file per specifications and then save the output as testreport_20120911_14:00:00.xls (2003-2007 format, todays date and saved time)
Also if there is any cell in the report file with comma separator, the template should take it in as new line with the cell.
Attached are the two example files.
Template.xlsx
Report.xlsx
0
kris_sk2012
Asked:
kris_sk2012
  • 2
  • 2
1 Solution
 
tdlewisCommented:
Where will the macro find the report file? and what are the specifications for selecting it?

Regarding the comma separator, do you mean you want it to be replaced with a new line character to create a multi-line cell?
0
 
kris_sk2012Author Commented:
Let's say that they both are in one directory for now. But I need an option to specify a full path once I know where they will be. So the template macro will go find for the report file in that path. And since there will be multiple files, we need the latest report file.

Regarding comma separator, this applies to only one column and where that is true, the comma would be replaced by a new line so they are readable in new line format.
0
 
tdlewisCommented:
It's easy enough to assign the directory path to a constant. When the macro looks through that directory, how will it know which file to select. Is it always the file with the newest modification time? Is it only files with names that match some criteria (say "report_*.xls*")?
0
 
kris_sk2012Author Commented:
For now let's say the file will be report.xls or report.xlsx
Only one file exists. Also the directory path is constant.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now