Configuration: Windows XP Opera 9.51
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. |
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
|
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
|
Résultats pour Copy data into next empty cell in new sheet
Résultats pour Copy data into next empty cell in new sheet
Résultats pour Copy data into next empty cell in new sheet
Résultats pour Copy data into next empty cell in new sheet
Résultats pour Copy data into next empty cell in new sheet