Search : in
By :

Copy data into next empty cell in new sheet

Last answer on Oct 13, 2009 5:02:46 am BST nikwak, on Jul 24, 2008 3:23:42 pm BST 
 Report this message to moderators

Hello,

I am trying to make a 2 sheet workbook which has the input details in Sheet1
A1 and this is changed weekly but the info in this cell should then be
inserted into the first blank cell in Column A in Sheet 2.

I have tried this code (below) but it doesn't seem to work and maybe I am
doing something wrong. Could someone let me know if this code should work
for this purpose or is there another code I could try?

Code used at present:

Sub copytonextsheet()
With Sheets("Sheet2")
n = .Cells(Rows.Count, "A").End(xlUp).Row + 1
.Cells(n, "A").Resize(, 4).Value = _
Cells(1, "A").Resize(, 4).Value
End With
End Sub


Thanks
Nick

Configuration: Windows XP
Opera 9.51

Best answers for « Copy data into next empty cell in new sheet » in :
Excel – Comparing cell A1 to entire A column in Sheet 2 ShowExcel – Comparing cell A1 to entire A column in Sheet 2 Issue Solution Note Issue I have been trying to compare sheet1 A2 to sheet2 A2 through A500 and if it exists somewhere in sheet2's a col then copy that entire row to a new sheet....
Excel – Macro to detect and hide blank rows ShowExcel – Macro to detect and hide blank rows Issue Solution Note Issue I want a macro to unhide about 20 blank rows copy values into the top row then hide the remaining rows (some cells have fill though) then the next time it will...
[VBA: VB6] Using excel from another application Show[VBA: VB6] Using excel from another application Here is a little routine to call Excel from VB6 or another Office application. Paste in a general module (eg Module1) In VBA>> Insert>> Module and paste in the window ... In VB6>>...
Download Directory Mate ShowDirectory Mate is a software to import or export data into Windows Active Directory. Long scripts and complex programming to import or export your contact list can be avoided now. It lets you create quickly new users and modify information in your...
Download Data Quik ShowData Quik allows you to copy data between two or several databases. This program can quickly copy data without using any other software and lets you select the fields or part of the tables to be copied. To accomplish that, it supports the files of...
UNIX system - The shell ShowIntroduction to the shell The command interpreter is the interface between the user and the operating system, hence its name "shell". The shell therefore acts as an intermediary between the operating system and the user using command lines...
Graphics cards - Video cards Show2D Accelerator Cards A graphics card, sometimes called a graphics adapter, video card or graphics accelerator, is a computer component which converts digital data into a graphical form which can be displayed on a monitor. The initial role of a...

1

shinny, on Oct 24, 2008 11:03:58 am BST
  • +1

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.

Reply to shinny

2

Kioskea_1, on Oct 27, 2008 12:32:24 pm GMT
  • +9

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

Reply to Kioskea_1

6

VBA novice, on Oct 30, 2008 5:21:00 pm GMT
  • +27

What if i only wanted to copy a certain date range from the source data to the destination data? Say 11/1/2006 through 11/30/2006?

Reply to VBA novice

8

meek7, on Aug 5, 2009 11:37:04 am BST
  • +4

How do i make it so the VB script runs automaticly every time i change data in the first spreadsheet?

Reply to meek7

10

 pete, on Oct 13, 2009 5:02:46 am BST

Say you had 2 text strings (constants) that you wanted to check on sheet1 and if found you wanted the entire row pasted to sheet2 bearing in mind that there are multiple instances of each constant how would one adapt the code to search and return only those specified rows?

Reply to pete

3

Kioskea_1, on Oct 27, 2008 12:34:14 pm GMT
  • +1

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

Reply to Kioskea_1

4

Kioskea_1, on Oct 27, 2008 12:35:38 pm GMT
  • +1

P.S "A4" is the row the new data is transfererred to

Reply to Kioskea_1

5

dbrown, on Oct 29, 2008 5:23:59 pm GMT
  • +9

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!

Reply to dbrown

7

Gautam, on Mar 24, 2009 5:39:38 am GMT
  • +3

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!

Reply to Gautam

9

meek7, on Aug 5, 2009 5:28:40 pm BST
  • +4

Any way to do this from 2 or more sheets, and consolidate them into one long list on a final sheet?

Reply to meek7