Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Using a macro to paste into first empty row in a new worksheet

Using a macro within a workbook, I am wishing to paste information from other
worksheets into an existing work sheet which already contains rows of data.
The macro should be able to determine the first empty row and then paste. I
cannot determine which function to use and how?

--
Bruce
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Using a macro to paste into first empty row in a new worksheet

Sub lookit()
Set s1 = Sheets("Sheet1")
Set s2 = Sheets("Sheet2")
Set r1 = Selection

For i = 1 To Rows.Count
If Application.CountA(s2.Rows(i)) = 0 Then
r1.Copy s2.Cells(i, "A")
Exit Sub
End If
Next
End Sub

Select the material you want to copy on Sheet1; the macro sill copy it to
the first blank row in Sheet2
--
Gary''s Student - gsnu200758


"Bruce64" wrote:

Using a macro within a workbook, I am wishing to paste information from other
worksheets into an existing work sheet which already contains rows of data.
The macro should be able to determine the first empty row and then paste. I
cannot determine which function to use and how?

--
Bruce

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,123
Default Using a macro to paste into first empty row in a new worksheet

See also
http://www.rondebruin.nl/copy1.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Bruce64" wrote in message ...
Using a macro within a workbook, I am wishing to paste information from other
worksheets into an existing work sheet which already contains rows of data.
The macro should be able to determine the first empty row and then paste. I
cannot determine which function to use and how?

--
Bruce

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 66
Default Using a macro to paste into first empty row in a new worksheet

This is very close to what I'm looking for EXCEPT
I want it to paste the validation edits ONLY.
Theo

"Gary''s Student" wrote:

Sub lookit()
Set s1 = Sheets("Sheet1")
Set s2 = Sheets("Sheet2")
Set r1 = Selection

For i = 1 To Rows.Count
If Application.CountA(s2.Rows(i)) = 0 Then
r1.Copy s2.Cells(i, "A")
Exit Sub
End If
Next
End Sub

Select the material you want to copy on Sheet1; the macro sill copy it to
the first blank row in Sheet2
--
Gary''s Student - gsnu200758


"Bruce64" wrote:

Using a macro within a workbook, I am wishing to paste information from other
worksheets into an existing work sheet which already contains rows of data.
The macro should be able to determine the first empty row and then paste. I
cannot determine which function to use and how?

--
Bruce

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
On a DDE Linked worksheet : Copy and Paste Value to a to a file via a macro ? Martin Links and Linking in Excel 0 November 20th 06 11:19 AM
macro- move down to empty cell & active worksheet EducatingMom Excel Worksheet Functions 3 August 4th 06 11:02 PM
cannot cut & paste because clipboard is empty Duce New Users to Excel 0 June 21st 06 10:58 PM
Macro copy and paste = blank worksheet efface Excel Discussion (Misc queries) 1 April 27th 06 09:52 PM
Cannat paste that macro formula onto a worksheet Stephen White Excel Discussion (Misc queries) 2 May 27th 05 11:58 AM


All times are GMT +1. The time now is 07:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"