Copy data into next empty cell in new sheet
Solved/Closed
nikwak
Posts
1
Registration date
Wednesday 23 July 2008
Status
Member
Last seen
24 July 2008
-
24 Jul 2008 à 10:23
rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 - 1 Dec 2012 à 10:21
rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 - 1 Dec 2012 à 10:21
Related:
- How to copy data to next empty row of another workbook in excel
- How to copy data from one excel sheet to another - Guide
- Excel move data from one sheet to another - Guide
- How to copy data to multiple worksheets in Excel - Guide
- How to delete a row in word - Guide
- Saints row 2 cheats - Guide
6 responses
Sub CopyRowsWithNumbersInG()
Dim X As Long
Dim LastRow As Long
Dim Source As Worksheet
Dim Destination As Worksheet
Dim RowsWithNumbers As Range
Set Source = Worksheets("name")
Set Destination = Worksheets("name")
With Source
LastRow = .Cells(.Rows.Count, "E").End(xlUp).Row
For X = 2 To LastRow
If IsNumeric(.Cells(X, "E").Value) And .Cells(X, "E").Value <> "" Then
If RowsWithNumbers Is Nothing Then
Set RowsWithNumbers = .Cells(X, "E")
Else
Set RowsWithNumbers = Union(RowsWithNumbers, .Cells(X, "E"))
End If
End If
Next
If Not RowsWithNumbers Is Nothing Then
RowsWithNumbers.EntireRow.Copy Destination.Range("A4")
End If
End With
MsgBox "Data has been updated !!", vbExclamation + vbInformation, "Company Name"
End Sub
Dim X As Long
Dim LastRow As Long
Dim Source As Worksheet
Dim Destination As Worksheet
Dim RowsWithNumbers As Range
Set Source = Worksheets("name")
Set Destination = Worksheets("name")
With Source
LastRow = .Cells(.Rows.Count, "E").End(xlUp).Row
For X = 2 To LastRow
If IsNumeric(.Cells(X, "E").Value) And .Cells(X, "E").Value <> "" Then
If RowsWithNumbers Is Nothing Then
Set RowsWithNumbers = .Cells(X, "E")
Else
Set RowsWithNumbers = Union(RowsWithNumbers, .Cells(X, "E"))
End If
End If
Next
If Not RowsWithNumbers Is Nothing Then
RowsWithNumbers.EntireRow.Copy Destination.Range("A4")
End If
End With
MsgBox "Data has been updated !!", vbExclamation + vbInformation, "Company Name"
End Sub
My question is same as dBrowns...
I have a worksheet in which I copy data that fit a certain criteria onto another sheet. From the original sheet, the one where the original data is copied from, I then go back and do some filtering. After I do the filtering I want copy that info and put it on the sheet with the previous data I had copied. How do I put that new data into the next available row in the new sheet.
Please could someone help me with this. If DBrown you have got a reply could you temme.
Thanks!
I have a worksheet in which I copy data that fit a certain criteria onto another sheet. From the original sheet, the one where the original data is copied from, I then go back and do some filtering. After I do the filtering I want copy that info and put it on the sheet with the previous data I had copied. How do I put that new data into the next available row in the new sheet.
Please could someone help me with this. If DBrown you have got a reply could you temme.
Thanks!
Hello Nick,
I am not getiing the result using ur code, I am also facing the same problem, I am unable to copy data from 1 sheet to another sheet which has empty columns, I want to paste the values from one excel to another excel which has first column whihc is empty, please help me ASAP.
Regards,
Shinny dead.
I am not getiing the result using ur code, I am also facing the same problem, I am unable to copy data from 1 sheet to another sheet which has empty columns, I want to paste the values from one excel to another excel which has first column whihc is empty, please help me ASAP.
Regards,
Shinny dead.
Replace "E" with your column and the destination and source names and the company name for the message box - this should work for what you need
P.S "A4" is the row the new data is transfererred to
Hello,
I have aquestion you may be able to help with based on one of your post.
I have a worksheet in which I copy data that fit a certain criteria onto another sheet. From the original sheet, the one where the original data is copied from, I then go back and do some filtering. After I do the filtering I want copy and that info and put it on the sheet with the previous data I had copied. How do I put that new data into the next available row in the new sheet.
Thanks!
I have aquestion you may be able to help with based on one of your post.
I have a worksheet in which I copy data that fit a certain criteria onto another sheet. From the original sheet, the one where the original data is copied from, I then go back and do some filtering. After I do the filtering I want copy and that info and put it on the sheet with the previous data I had copied. How do I put that new data into the next available row in the new sheet.
Thanks!
30 Oct 2008 à 13:21
5 Aug 2009 à 06:37
13 Oct 2009 à 00:02
6 Jul 2010 à 10:17
6 Jul 2010 à 18:58
if (Cells(1, "A") = "") then
msgbox "Cell A1 is blank"
else
msgbox "cell a1 is not blank"
end if