I am in the begining stages of learning vba coding for excel. I am trying to automate the creation of ~30 quarterly reports I have to generate each month. I have my basic code down that will generate a single report. What I cannot figure out is how to loop through this code, with each loop using a new value for 2 variables that will be pulled from a range on a spreadsheet.
I think the best way to ask this would be to work through a simple example using a message box populated by two variables. Lets say I have two columns of data in an excel worksheet (Column "A" = Divisions and Column "B" = CostCenters). There are 5 rows of data: division1, division2, ect.
I am looking for a VBA formula that will show a message box that says Division & "-" & CostCenter (assuming Division and CostCenter are my variables) for each of the five lines of data. So five message boxes would appear when the procedure is executed.
I think if I can get this simplified VBA procedure to work, I will be able to apply the concept to my more complex procedure that I already have written.
Thanks in advance. I have already learned tons from lurking on this board for awhile.
I think the best way to ask this would be to work through a simple example using a message box populated by two variables. Lets say I have two columns of data in an excel worksheet (Column "A" = Divisions and Column "B" = CostCenters). There are 5 rows of data: division1, division2, ect.
I am looking for a VBA formula that will show a message box that says Division & "-" & CostCenter (assuming Division and CostCenter are my variables) for each of the five lines of data. So five message boxes would appear when the procedure is executed.
I think if I can get this simplified VBA procedure to work, I will be able to apply the concept to my more complex procedure that I already have written.
Thanks in advance. I have already learned tons from lurking on this board for awhile.