Hi
I’ve been using the following code to search through anworksheet, find the contents of Sheet2 a5 and copy the entire column to adifferent sheet.
I’m sure it could be tidier but it has done exactly what Ineeded it to do as the contents of Sheet2 A5 have always been unique and notappeared anywhere else in the worksheet.
I now want to search for Sheet2 A6 and do the same (copy thecontents of the column headed up by that value) but the value is going toappear throughout the worksheet. I’vetried substituting the cell ref and it copies the first entry on the sheet itgets to.
How can I either amend my original code or use new to justsearch through the 1st row where the contents will only appear onceand then copy the column beneath it?
Many thanks in advance
I’ve been using the following code to search through anworksheet, find the contents of Sheet2 a5 and copy the entire column to adifferent sheet.
HTML:
Columns(Sheets("Sheet1").UsedRange.Find(Sheets("Sheet2").Range("a5").Value,LookIn:=xlValues, lookat:=xlWhole).Column).EntireColumn.Copy
Sheets("Pilots").Range("n1").PasteSpecialxlAll
I’m sure it could be tidier but it has done exactly what Ineeded it to do as the contents of Sheet2 A5 have always been unique and notappeared anywhere else in the worksheet.
I now want to search for Sheet2 A6 and do the same (copy thecontents of the column headed up by that value) but the value is going toappear throughout the worksheet. I’vetried substituting the cell ref and it copies the first entry on the sheet itgets to.
How can I either amend my original code or use new to justsearch through the 1st row where the contents will only appear onceand then copy the column beneath it?
Many thanks in advance