Hi everyone,
I have tried a few different ways to do this, and am yet to find a simple solution.
I have created a mock spreadsheet to represent my problem. My real workbook is 100's of 1000's of rows with more complicated calcs, so hopefully this mock problem represent what I am trying to solve.
Here is my procedure that I am trying to write in VBA.
1. Take first value in cell of range1 (A3:A20) and output to C3
2. Cell C3 well now become an input into excel's Filter function which I will only like to filter Range 2 (E2:K665) on the value of cell C2.
3. The filtered range based on the value of cell C2 will then allow me to perform a calculation on column R, and the output of this will be in column V (along with corresponding Number which is in column U). The reality is the calculation performed is much more complicated than this, but I have made it much simpler for the sake of this exercise.
4. Based on my output range in columns U and V I would like to copy and paste (or some much better way??) into column XY (only the cells with values in them).
5. Repeat this process for each cell in range1 (A3:A20) and keep adding to the bottom of values in XY until the last value in range (A3:A20) is reached.
Have tried a combination of For loops to and then tried to add in a copy and paste, but no VBA that has done the job....yet.
Hoping you peopes out there can help me solve a problem that is keeping me up at night.....
Regards,
J
Bookmarks