I've been piece-mailing together my knowledge of macros based mainly on forums like this and now I finally have a macro that does what I want..mostly. I also understand that explaining my needs is sometimes the hardest part of this, so if my post is lacking clarity, please let me know and I'll try to be more clear.
Right now I have 3 sheets (numbers, query, and main). On Sheet numbers, I have in column B a number in each cell. The amount of cells with numbers changes constantly, but they are always consecutive beginning with cell B2. Right now, my macro checks to see if Sheet Query, cell A1 is blank, if not, then it deletes the contents of the sheet. It then goes to Sheet numbers and checks that cell B2 is not blank, then pulls the number and adds it as a parameter in a url for a web query. (if it is blank it ends the sub) It then runs this query on a Sheet query. It goes onto pull data from this web query and place it on sheet main, cell C2
After it pulls this data I have repeated the macro to do the same for cell B3 (and cell C3 on the main sheet). it then repeats for B4 (C4), B5 (C5), etc. After 10 cells, I have a ridiculously long macro. I just want to know how to loop the macro after 1 set. Each time it will change the Cells from B1 to B2 to B3 etc. The only part of the macro that needs to change in each loop are the cells B2 on sheet number, and the cells C2 on sheet main, and they need to change by +1 each time.
Right now I have 3 sheets (numbers, query, and main). On Sheet numbers, I have in column B a number in each cell. The amount of cells with numbers changes constantly, but they are always consecutive beginning with cell B2. Right now, my macro checks to see if Sheet Query, cell A1 is blank, if not, then it deletes the contents of the sheet. It then goes to Sheet numbers and checks that cell B2 is not blank, then pulls the number and adds it as a parameter in a url for a web query. (if it is blank it ends the sub) It then runs this query on a Sheet query. It goes onto pull data from this web query and place it on sheet main, cell C2
After it pulls this data I have repeated the macro to do the same for cell B3 (and cell C3 on the main sheet). it then repeats for B4 (C4), B5 (C5), etc. After 10 cells, I have a ridiculously long macro. I just want to know how to loop the macro after 1 set. Each time it will change the Cells from B1 to B2 to B3 etc. The only part of the macro that needs to change in each loop are the cells B2 on sheet number, and the cells C2 on sheet main, and they need to change by +1 each time.