PC Review


Reply
Thread Tools Rate Thread

Copy Data from Sheet 1 to Empty Cell in Sheet 2

 
 
dtoland
Guest
Posts: n/a
 
      4th Nov 2009
I'm getting a little frustrated with this simple problem, but don't
have a lot of time to spend reading massive Excel books to figure it
out. I hope someone can help me!
Here's the goal:

To take data from a cell in Sheet1, paste it into a cell in Sheet2.
If the designated cell already contains data, then paste into the next
empty cell in the same column.

Here's where I'm at:

'CURRENT SHEET SELECT CELL G7
Range("G7").Select
'COPY CURRENT CELL
Selection.Copy
'MOVE TO WORKSHEET "REQUEST LOG"
Sheets("REQUEST LOG").Select
'SELECT CELL C3 IF EMPTY, IF NOT, SELECT NEXT EMPTY CELL IN COLUMN
If IsEmpty(Range("C3")) Then
Range("C3").Select
End If
'PASTE COPIED DATA INTO EMPTY CELL OF COLUMN C (this is where the
problem is)
Selection.Paste
 
Reply With Quote
 
 
 
 
Patrick Molloy
Guest
Posts: n/a
 
      4th Nov 2009
With Sheets("REQUEST LOG").cells(rows.count,"C").End(xlup).Offset(1)
..value = range("G7").Value
End With

the first line say go to the end (bottom) of the column, go uo to the last
cell in that column, then down to the next available


"dtoland" <(E-Mail Removed)> wrote in message
news:d6dbdc52-3061-4654-a939-(E-Mail Removed)...
> I'm getting a little frustrated with this simple problem, but don't
> have a lot of time to spend reading massive Excel books to figure it
> out. I hope someone can help me!
> Here's the goal:
>
> To take data from a cell in Sheet1, paste it into a cell in Sheet2.
> If the designated cell already contains data, then paste into the next
> empty cell in the same column.
>
> Here's where I'm at:
>
> 'CURRENT SHEET SELECT CELL G7
> Range("G7").Select
> 'COPY CURRENT CELL
> Selection.Copy
> 'MOVE TO WORKSHEET "REQUEST LOG"
> Sheets("REQUEST LOG").Select
> 'SELECT CELL C3 IF EMPTY, IF NOT, SELECT NEXT EMPTY CELL IN COLUMN
> If IsEmpty(Range("C3")) Then
> Range("C3").Select
> End If
> 'PASTE COPIED DATA INTO EMPTY CELL OF COLUMN C (this is where the
> problem is)
> Selection.Paste


 
Reply With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      4th Nov 2009
Assuming, as you indicated, that you are running your code from the
ActiveSheet, you can use this single line of code to copy the contents of
the G7 into your REQUEST LOG sheet into the first blank cell starting with
C3 (that is, if C3 is empty, the copy will be into C3; if C3 through, say,
C7 are not empty, then the copy will be into C8)...

Sheets("Sheet8").Columns(3).Find("", Range("C2")).Value = Range("G7").Value

Notice that you do not have to do all that Select'ing to perform this
operation.

--
Rick (MVP - Excel)


"dtoland" <(E-Mail Removed)> wrote in message
news:d6dbdc52-3061-4654-a939-(E-Mail Removed)...
> I'm getting a little frustrated with this simple problem, but don't
> have a lot of time to spend reading massive Excel books to figure it
> out. I hope someone can help me!
> Here's the goal:
>
> To take data from a cell in Sheet1, paste it into a cell in Sheet2.
> If the designated cell already contains data, then paste into the next
> empty cell in the same column.
>
> Here's where I'm at:
>
> 'CURRENT SHEET SELECT CELL G7
> Range("G7").Select
> 'COPY CURRENT CELL
> Selection.Copy
> 'MOVE TO WORKSHEET "REQUEST LOG"
> Sheets("REQUEST LOG").Select
> 'SELECT CELL C3 IF EMPTY, IF NOT, SELECT NEXT EMPTY CELL IN COLUMN
> If IsEmpty(Range("C3")) Then
> Range("C3").Select
> End If
> 'PASTE COPIED DATA INTO EMPTY CELL OF COLUMN C (this is where the
> problem is)
> Selection.Paste


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy rows from one Data sheet to another sheet based on cell conte John McKeon Microsoft Excel Misc 2 15th May 2010 06:49 AM
Auto copy cell data from source sheet to another wrkbook sheet IVLUTA Microsoft Excel Programming 2 2nd Jun 2009 05:07 PM
copy data of two cells from Sheet 2 into one cell in Sheet 1 cahabbinga Microsoft Excel Worksheet Functions 6 30th Jan 2008 01:00 PM
Copy row with an empty cell for each row in a sheet talista@gmail.com Microsoft Excel Misc 2 24th Apr 2007 05:18 AM
how to copy a cell with formula from sheet 1 (data is all vertical) into sheet 2 parag Microsoft Excel Worksheet Functions 3 15th Jun 2006 10:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:08 AM.