How to paste data?
how to paste data range not overlapping the previous data but moving it
down? --- Message posted from http://www.ExcelForum.com/ |
How to paste data?
Is this what you need?
Sub MoveDownData() Dim S1 As Worksheet: Dim rng As Range Dim Cel As Variant: Dim EndRow As Long Set S1 = Sheets("Sheet1") EndRow = S1.Range("C65536").End(xlUp).Row Set rng = S1.Range(Cells(1, 3), Cells(EndRow + 1, 3)) For Each Cel In rng If Cel.Value = "" Then Cel.Value = "Happy Holidays" Exit For End If Next Cel End Sub -----Original Message----- how to paste data range not overlapping the previous data but moving it down? --- Message posted from http://www.ExcelForum.com/ . |
How to paste data?
Start from the top of the range(the first cell with
data). This will find the bottom, then select and copy the range and put it directly below the original data. Sub Macro1() Top = ActiveCell.Address Selection.End(xlDown).Select Bottom = ActiveCell.Address Range((Top) & ":" & (Bottom)).Select Selection.Copy Selection.End(xlDown).Select ActiveCell.Offset(1, 0).Range("A1").Select ActiveSheet.Paste Application.CutCopyMode = False End Sub -----Original Message----- how to paste data range not overlapping the previous data but moving it down? --- Message posted from http://www.ExcelForum.com/ . |
All times are GMT +1. The time now is 11:06 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com