I would like to create a small VBA for Excel application that can do the following:
1) At a click of a button, import data from a Csv file, or more than one Csv file into the Excel workbook
2) Create a specified chart type from the data imported. The data in the Csv file will consist of only two columns. I would like to have the chart plot the values in the first column as the x-axis of the chart, and the values in the second column as the y axis.
3) Be able to plot more than one set of values on the same chart depending on the data that was imported, but still be able to distinguish the various charts from each other.
Below I have expanded on the details:
I have attached an excel file that contains 3 sets of data that 'in the context' of this application have been imported from 3 different csv files.
The x-axis is populated from the first column of the csv data and the y axis populated from the second column. I have used the line chart format, but I would desire the chart type to be modified easily, maybe commenting the section of code?
There is a single chart for each set of data, then a chart with the combined set of data. Now here is the catch; the data currently has the same scaling in terms of the x axis values, but can the application incorporate the fact that the data imported from the csv file(s) could have different ranges for the x-axis, and still be able to plot several charts on one x-axis? The y axis values of course will have different values but I am figuring that the scaling issue here has more to do with the x-axis...
Another thing to note is that when the application imports the csv files it should be able to arrange the sets of data appropriately in the spreadsheet so that it is evident that they are different sets of data.
Also it should be able to plot the chart based on the number of sets of data that have been imported, ie. if 2 sets of data have been imported, then there can either be 2 single charts, or a combined chart with 2 different sets of data etc...