cut raw from...
-
- PlatinumLounger
- Posts: 4355
- Joined: 26 Apr 2010, 17:36
cut raw from...
I need to cut a range from A2 to AB2, from sheet1 and append to the last not filled raw, base column A, copy the cutted range in A, naturally move up the not blank raw from sheet1...
-
- Administrator
- Posts: 78487
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: cut raw from...
I assume that you mean row, not raw.
To which sheet do you want to append?
To which sheet do you want to append?
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4355
- Joined: 26 Apr 2010, 17:36
-
- Administrator
- Posts: 78487
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: cut raw from...
Code: Select all
Sub CutRow()
Dim WS1 As Worksheet
Dim WS2 As Worksheet
Dim Rng As Range
Set WS1 = Worksheets("foglio1")
Set WS2 = Worksheets("foglio2")
Set Rng = WS2.Range("A" & WS2.Rows.Count).End(xlUp).Offset(1)
Rng.Resize(1, 28).Value = WS1.Range("A2").Resize(1, 28).Value
WS1.Range("A2").EntireRow.Delete
End Sub
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4355
- Joined: 26 Apr 2010, 17:36
Re: cut raw from...
sorry but i need to paste in Column B of sheet ws2, not in AHansV wrote: ↑12 May 2021, 17:13Code: Select all
Sub CutRow() Dim WS1 As Worksheet Dim WS2 As Worksheet Dim Rng As Range Set WS1 = Worksheets("foglio1") Set WS2 = Worksheets("foglio2") Set Rng = WS2.Range("A" & WS2.Rows.Count).End(xlUp).Offset(1) Rng.Resize(1, 28).Value = WS1.Range("A2").Resize(1, 28).Value WS1.Range("A2").EntireRow.Delete End Sub
in column A of sheet WS2, i need to insert the current date, for each row pasted.
in other case the code work well!
-
- Administrator
- Posts: 78487
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands