Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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/ . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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/ . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How copy none excel data & paste in 2007 without overwriting data | Excel Discussion (Misc queries) | |||
EXCEL PASTE DOES NOT CHANGE DATA - PASTE DOESN'T WORK! | Excel Worksheet Functions | |||
filted data, copy and paste a col. puts data in wrong row how fix | New Users to Excel | |||
Find, Match data and paste data between two workbooks | Excel Discussion (Misc queries) | |||
Excel cut/Paste Problem: Year changes after data is copy and paste | Excel Discussion (Misc queries) |