Decision
06-28-2016, 05:11 AM
Hi guys,
I have been working with VBA for a while and although I understand/can read some code (have even followed an online course) I find it hard to make one myself. Especially for the following purpose:
I have a dataset of 649 unique companies (column A). For two different weeks (2 x 6 days; in column B week is specified - i.e. 0 or 1 - and in column C the day is specified: 1 for Monday, 2 for Tuesday and so on), I have recorded accumulated sales data per half hour (column D specifies which half hour 0-29; column E specifies the acc. sales volume up til that half hour). Not every company however has sales volume during each half hour or each day or sometimes even each week.
I would like to produce a vba code which makes line graphs for each company and place these graphs into a new worksheet. In order to ensure the number of graphs is oversee able, I would like to plot both weeks of sales data per company in one graph, each day may be presented after one another (e.g. on the x axis there will be 6 days, within those days showing the half hours in which sales have been produced) thus stretching six days in one line and producing two lines for one company in one graph.
Consequently, I assume there should be a loop for each company (1-649), for each week (0-1) and for each day (1-6), putting all those details on accumulated sales (column E) per day in one graph and then go on the next company.. I have been cracking my brains over this and checking other codes but I don't know where to start unfortunately. Hope someone could help me out!
Thanks a LOT in advance..
I have been working with VBA for a while and although I understand/can read some code (have even followed an online course) I find it hard to make one myself. Especially for the following purpose:
I have a dataset of 649 unique companies (column A). For two different weeks (2 x 6 days; in column B week is specified - i.e. 0 or 1 - and in column C the day is specified: 1 for Monday, 2 for Tuesday and so on), I have recorded accumulated sales data per half hour (column D specifies which half hour 0-29; column E specifies the acc. sales volume up til that half hour). Not every company however has sales volume during each half hour or each day or sometimes even each week.
I would like to produce a vba code which makes line graphs for each company and place these graphs into a new worksheet. In order to ensure the number of graphs is oversee able, I would like to plot both weeks of sales data per company in one graph, each day may be presented after one another (e.g. on the x axis there will be 6 days, within those days showing the half hours in which sales have been produced) thus stretching six days in one line and producing two lines for one company in one graph.
Consequently, I assume there should be a loop for each company (1-649), for each week (0-1) and for each day (1-6), putting all those details on accumulated sales (column E) per day in one graph and then go on the next company.. I have been cracking my brains over this and checking other codes but I don't know where to start unfortunately. Hope someone could help me out!
Thanks a LOT in advance..