fari1
Active Member
- Joined
- May 29, 2011
- Messages
- 362
Hi,
my below code, finds a text, copies it and paste it into another sheet, want to add a functionality into it, that the paste should be ater the used cell in the range.
my below code, finds a text, copies it and paste it into another sheet, want to add a functionality into it, that the paste should be ater the used cell in the range.
Code:
Sub newcode()
Dim ValueBelowD As Variant, DCell As Range, CellBelowD As Range
Set DCell = Worksheets("sheet1").Cells.Find("Document", , xlValues, xlWhole, , , False)
Set CellBelowD = Worksheets("Sheet1").Cells.Find("*", DCell, xlValues, xlWhole, xlByColumns, xlNext)
ValueBelowD = CellBelowD.Value
With Sheets("data")
.Range("A1").Value = CellBelowD
End With
End Sub