Hi MrExcel Community,
my name is Dominika and I'm looking for a VBA code help.
I need to automate some of my Excel work for the sake of completing my dissertation on time, but I'm new to VBA.
I have data that have following columns:
year quarter code number1 number2
The data are properly sorted according to the year, quarter and number1 which are digit data sorted from the smallest to the biggest
All I need is a code in VBA that would make the following
for every year and every quarter
count number of rows in given quarter in given year and save as a variable X
open new file
import the first X/4 integer number of rows
at the end of every quarter add a line with a product from column 'number2' of all imported rows
(repeat the above (create new files with imported data) until all the rows from given year and quarter are imported.)
move to another year and separate the data similar as above and add them as new lines to already existing 4 files.
save and close the files
I want to end up with 4 files containing grouped data that span from 2005 quarter 1 to 2014 quarter 4.
Could you please help me out with converting these instructions into VBA code?
my name is Dominika and I'm looking for a VBA code help.
I need to automate some of my Excel work for the sake of completing my dissertation on time, but I'm new to VBA.
I have data that have following columns:
year quarter code number1 number2
The data are properly sorted according to the year, quarter and number1 which are digit data sorted from the smallest to the biggest
All I need is a code in VBA that would make the following
for every year and every quarter
count number of rows in given quarter in given year and save as a variable X
open new file
import the first X/4 integer number of rows
at the end of every quarter add a line with a product from column 'number2' of all imported rows
(repeat the above (create new files with imported data) until all the rows from given year and quarter are imported.)
move to another year and separate the data similar as above and add them as new lines to already existing 4 files.
save and close the files
I want to end up with 4 files containing grouped data that span from 2005 quarter 1 to 2014 quarter 4.
Could you please help me out with converting these instructions into VBA code?
