I have a excel file which contains 5 sheets in it. The 1st sheet contains hyperlinks form A1 to A4 cells with some names pointing to the respective 4 sheets in the workbook.
I need to write vba function which should consist of a while loop, loop through each cell in sheet 1, then after reading 1st cell in sheet 1 it should go to the connected sheet copy all the data from it and put it in a different workbook and again go to next cell in sheet 1 copy the data and appened the data to the new workbook and repeat the process till it finds an empty cell.
Please provide me a sample as i am new to vba programming.
Thank you in advance
I have a excel file which contains 5 sheets in it. The 1st sheet
Share
For demonstrative purposes, since the OP had originally asked for a sample. This will take 4 cells defined in the first sheet of a workbook and collect selected cells’ data from the second and third sheets and paste it into the 4th.
The first sheet:
The macro code:
Obviously a lot of it hard-coded to this situation, and I’m sure there are more effective ways to do it.