In summary, I am trying to achieve the following:
-I have a workbook containing two sheets (Sheet1 & Sheet2) Sheet1 will contain raw data a number label in columnA and the data value in columnB, sheet2 will contain formula at various locations
-I would like to be able to enter two variables in sheet2, in cells A1, and B1. When the code is ran I would like excel to search sheet1 columnA for the value entered in sheet2 A1, copy the adjacent data value, then search sheet2 columnC for the value in sheet2 B1 and paste to the corresponding adjacent cell in columnD.
I have the code below which will complete the first two parts of the procedure.
This searches columnA sheet1 for the value in sheet2 A1 and copies to a set location (D3).
What I need is for the paste location to be either D3 or D6, depending on if the value entered in B1= the value in C3 or C6.
Does anyone know how to change the paste location , based on the concept described above?
Note. I have simplified this as much as possible for the purposes of getting code to work, in practice I will need to adapt it to copy several batches of rows at a time to several possible locations.
Apologies I cannot post the spreadsheet; the version I am using has a proprietary VBA installed (that is nothing to do with this particular calculation) which I am not allowed to post
Bookmarks