I am very new to VBA, been teaching myself and maybe asking something quite basic. I apologise if this is the case, but I haven't come across anything yet that I can tweek to my needs.
Here's what I'm looking to do (I'm using specific cell references):
For every instance where a cell in SourceWorkbook "A10:A40000" is equal to the value of SourceWorkbook "E7", copy cells in that row from column "C:J" and paste into relevant number of rows within DestinationWorkbook range "C18:J37" (there will never be more than 20 results).
From what I can gather there are a couple of paths the code could go down -
1 - After opening source doc, filter column "A" to equal value of "E7" then copy/paste values of required results into destination doc from "C18" onwards, or
2 - Creating a loop that looks for first instance of "E7" value in "A", copy/paste that row from "C:J" into next blank row within destination doc range "C18:J37", repeat for each instance
The "filtering" option would appear the simplest method, but unfortunately I don't know how to write either. Any help would be greatly appreciated. Thank you.
Here's what I'm looking to do (I'm using specific cell references):
For every instance where a cell in SourceWorkbook "A10:A40000" is equal to the value of SourceWorkbook "E7", copy cells in that row from column "C:J" and paste into relevant number of rows within DestinationWorkbook range "C18:J37" (there will never be more than 20 results).
From what I can gather there are a couple of paths the code could go down -
1 - After opening source doc, filter column "A" to equal value of "E7" then copy/paste values of required results into destination doc from "C18" onwards, or
2 - Creating a loop that looks for first instance of "E7" value in "A", copy/paste that row from "C:J" into next blank row within destination doc range "C18:J37", repeat for each instance
The "filtering" option would appear the simplest method, but unfortunately I don't know how to write either. Any help would be greatly appreciated. Thank you.