Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / September 2006

Tip: Looking for answers? Try searching our database.

Macro to insert data into next blank row?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jim - 06 Sep 2006 23:40 GMT
I have a list of names, addresses, etc that I'm setting up for a mail merge.
I already have a macro that converts the names from a format like this:

Col A

Name

Address

City, state, zip

   Col A    Col B      Col C

To this:   Name   Address   City, State, Zip

I need to be able to take the normalized data and paste it into another
workbook that has the finished list in it. I need it to paste the new row
into the first blank row in the list and then keep moving down. Anyone know
how to do this? I'm using Excel 2003. Thanks for any help.

Jim
Jim Thomlinson - 07 Sep 2006 00:01 GMT
This creates a range object on Sheet 1 in the first blank cell in Row A. It
then selects the range object but that is not necessary

dim rng as range

set rng = sheets("Sheet1").cells(rows.count, "A").end(xlUp).offset(1,0)
rng.select
rng.value = "this"
rng.offsets(0, 1).value = "that"

Signature

HTH...

Jim Thomlinson

> I have a list of names, addresses, etc that I'm setting up for a mail merge.
> I already have a macro that converts the names from a format like this:
[quoted text clipped - 17 lines]
>
> Jim
m96 - 09 Sep 2006 09:40 GMT
how about something like that?

---
dim wks as worksheet, i as int

set wks = worksheets("<otherWks>")
i = wks.usedrange.rows.count
i = i + 1
activesheet.range("<theRangeYouWantToCopy>").copy
activesheet.paste destination:=wks.range("A" & i)
---

> I have a list of names, addresses, etc that I'm setting up for a mail merge.
> I already have a macro that converts the names from a format like this:
[quoted text clipped - 17 lines]
>
> Jim
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.