Reputation: 3
I have a column of specific names and one of the cell in a column is blank i want to copy a value from one selected cell and paste it in this blank cell.
Worksheets("project Allocation").Range("B8").Copy
Worksheets("Project Allocation").Range("****").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
I have copied value from cell B8 and want to paste values in the range of (R13: R200) cell which is blank. I am unable to define that paste range.
Upvotes: 0
Views: 112
Reputation: 6664
This should do the trick:
Worksheets("project Allocation").Range("B8").Copy
Worksheets("Project Allocation").Range("R13:R200").SpecialCells(xlCellTypeBlanks).PasteSpecial xlPasteValues
Application.CutCopyMode = False
It will paste the value in B8
to all the blank cells in the range R13:R200
. In your case you only have one blank cell, so that will get the value.
Upvotes: 1