Hi all!
I am trying to copy values in cells from one worksheet to another after filtering. My problem is that the code below is copying the headers when a cell is blank. I would like it to just keep the cell blank instead in the worksheet where the data is being pasted. Please see my code below:
It may be worth mentioning at the point that I also just want to copy and paste the text not the formatting etc.
Thanks in advance for your help.
Eve
I am trying to copy values in cells from one worksheet to another after filtering. My problem is that the code below is copying the headers when a cell is blank. I would like it to just keep the cell blank instead in the worksheet where the data is being pasted. Please see my code below:
Code:
Sheets("HR Advice & Admin").Select
FilterString = Sheets("Offer Received").Range("G5").Value
ActiveSheet.Range("$A$1:$AS$286").AutoFilter Field:=1, Criteria1:=FilterString
Range("B2:B" & Cells(Rows.Count, "B").End(xlUp).Row).SpecialCells(xlCellTypeVisible).Copy _
Sheets("Offer Received").Range("B5")
Sheets("HR Advice & Admin").Select
Range("C2:C" & Cells(Rows.Count, "C").End(xlUp).Row).SpecialCells(xlCellTypeVisible).Copy _
Sheets("Offer Received").Range("B10")
Sheets("HR Advice & Admin").Select
It may be worth mentioning at the point that I also just want to copy and paste the text not the formatting etc.
Thanks in advance for your help.
Eve