Hello Folks,

I have a worksheet that will have data imported into sheet 2, but the number of rows between one set of data values, or Source values, and the other set of data values, or Target values, vary from one imported spreadsheet to the next. The values of the headers for each grouping are standard though. So I need the macro to find the row that contains the string "Configuration for R4(B)(C) sites", then find the string "Site USID" and copy all rows down to the row just above the row that contains the string "New Target IP Configuration" and place them in sheet 1 in the range A4:I19. Then do the same for the data for the Target configuration.

I need to be able to pull data from these based on the site value that is selected, so I need these values to be found in a consistent location so I can use VLOOKUP effectivity to pull the correct data for the selected site.

I'm hoping someone has a macro that can fullfill these requirements as I've been stumped on how to do this for some time.

Attached is a sample worksheet with sample data populated into sheet 2. MacroTest1.xlsm

I will be eternally grateful to anyone that can help me here.

Thanks in advance,
Patrick