Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Pasting Selection In First Blank Row

Right now I am writting a macro that needs to paste a bunch of rows
into a different sheet. The problem is I need these additional rows to
be pasted in the first set of blank rows. Please help. Thank you

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default Pasting Selection In First Blank Row

Hi tnederlof

Check out this page
http://www.rondebruin.nl/copy1.htm

--

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


"tnederlof" wrote in message oups.com...
Right now I am writting a macro that needs to paste a bunch of rows
into a different sheet. The problem is I need these additional rows to
be pasted in the first set of blank rows. Please help. Thank you

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Pasting Selection In First Blank Row

On Feb 6, 5:06 pm, "Ron de Bruin" wrote:
Hi tnederlof

Check out this pagehttp://www.rondebruin.nl/copy1.htm

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm



"tnederlof" wrote in ooglegroups.com...
Right now I am writting a macro that needs to paste a bunch of rows
into a different sheet. The problem is I need these additional rows to
be pasted in the first set of blank rows. Please help. Thank you- Hide quoted text -


- Show quoted text -


I looked through it and I found nothing about pasting into the last
row, could you please type the formula here? Thanks

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default Pasting Selection In First Blank Row

Hi tnederlof

If you not read the information on the page I can't help you


--

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


"tnederlof" wrote in message oups.com...
On Feb 6, 5:06 pm, "Ron de Bruin" wrote:
Hi tnederlof

Check out this pagehttp://www.rondebruin.nl/copy1.htm

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm



"tnederlof" wrote in ooglegroups.com...
Right now I am writting a macro that needs to paste a bunch of rows
into a different sheet. The problem is I need these additional rows to
be pasted in the first set of blank rows. Please help. Thank you- Hide quoted text -


- Show quoted text -


I looked through it and I found nothing about pasting into the last
row, could you please type the formula here? Thanks

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Pasting Selection In First Blank Row

On Feb 6, 5:21 pm, "Ron de Bruin" wrote:
Hi tnederlof

If you not read the information on the page I can't help you

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm



"tnederlof" wrote in ooglegroups.com...
On Feb 6, 5:06 pm, "Ron de Bruin" wrote:
Hi tnederlof


Check out this pagehttp://www.rondebruin.nl/copy1.htm


--


Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm


"tnederlof" wrote in ooglegroups.com...
Right now I am writting a macro that needs to paste a bunch of rows
into a different sheet. The problem is I need these additional rows to
be pasted in the first set of blank rows. Please help. Thank you- Hide quoted text -


- Show quoted text -


I looked through it and I found nothing about pasting into the last
row, could you please type the formula here? Thanks- Hide quoted text -


- Show quoted text -


I read it but it doesn't seem to make much sense, I have to use all
three parts to copy and paste? when I tried to use the pasting part it
told me that the last row was not defined. Can anyone else help?



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default Pasting Selection In First Blank Row

Read this
****************

The example macro's will copy data (from Sheet1) to a database sheet with the name Sheet2.
Every time you run one of the macro's the cells will be placed below the last row
with data or after the last Column with data in sheet2.

For each example there are 3 macro's.
1: The first one copy everything
2 :The second one use PasteSpecial to copy only the values.
See help for more information about the options for PasteSpecial.
The PasteSpecial macro's can also be used to transpose the range that you copy,
change the last argument to True if you want that.
3 :The third one use the value property and will only copy the values.

Copy a range with one Area
Copy a range with more Areas
Copy a Row or Rows
Copy a Column or Columns
Copy cells from the ActiveCell Row
Copy Selection
Copy selection with more Areas
Example If the Database sheet is in another workbook


The Example macro's use one of the functions below, the macro's will not work if you
don't copy them in the module also.

The functions needed for :
1: Finding the last row with data
2: Finding the last column with data

Where do I place the macro's and the functions?
1. Alt-F11
2. InsertModule from the Menubar
3. Paste the Code there
4. Alt-Q to go back to Excel
5. Alt-F8 to run the subs

http://www.mvps.org/dmcritchie/excel/getstarted.htm
See David McRitchie's site if you just started with VBA
'************************************************* ********
Function LastRow(sh As Worksheet)
On Error Resume Next
LastRow = sh.Cells.Find(What:="*", _
After:=sh.Range("A1"), _
Lookat:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Row
On Error GoTo 0
End Function
Function Lastcol(sh As Worksheet)
On Error Resume Next
Lastcol = sh.Cells.Find(What:="*", _
After:=sh.Range("A1"), _
Lookat:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByColumns, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Column
On Error GoTo 0
End Function
'************************************************* ********


--

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


"tnederlof" wrote in message oups.com...
On Feb 6, 5:21 pm, "Ron de Bruin" wrote:
Hi tnederlof

If you not read the information on the page I can't help you

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm



"tnederlof" wrote in ooglegroups.com...
On Feb 6, 5:06 pm, "Ron de Bruin" wrote:
Hi tnederlof


Check out this pagehttp://www.rondebruin.nl/copy1.htm


--


Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm


"tnederlof" wrote in ooglegroups.com...
Right now I am writting a macro that needs to paste a bunch of rows
into a different sheet. The problem is I need these additional rows to
be pasted in the first set of blank rows. Please help. Thank you- Hide quoted text -


- Show quoted text -


I looked through it and I found nothing about pasting into the last
row, could you please type the formula here? Thanks- Hide quoted text -


- Show quoted text -


I read it but it doesn't seem to make much sense, I have to use all
three parts to copy and paste? when I tried to use the pasting part it
told me that the last row was not defined. Can anyone else help?

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
Using COUNTIF to search for existence Epinn Excel Worksheet Functions 31 October 27th 06 04:57 AM
add blank space in cell if first name is not blank stef Excel Worksheet Functions 6 August 23rd 06 02:26 AM
how do I insert a blank row when pasting? mimmo Excel Discussion (Misc queries) 0 February 3rd 06 06:18 PM
enter numbers in blank cells bill gras Excel Worksheet Functions 2 September 21st 05 01:17 PM
Cell Selection after "Enter" Synectica Excel Discussion (Misc queries) 6 August 29th 05 09:55 PM


All times are GMT +1. The time now is 11:25 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"