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 / June 2005

Tip: Looking for answers? Try searching our database.

How do i write a Macro that does following

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gautam - 24 May 2005 13:59 GMT
i have a sheet which contains following information

Name                                  Last name
Address                               Title
City                                     Telephone
Zip                                      e mail
Country
of about 100nds of addresses

What i want to do in here is to get this information on another sheet stored
in columns i.e

Name  Address City  Zip  Country  Title   Telephone     e-mail
Bob Phillips - 24 May 2005 14:21 GMT
Take a look at VLOOKUP in help.

Signature

HTH

Bob Phillips

> i have a sheet which contains following information
>
[quoted text clipped - 9 lines]
>
> Name  Address City  Zip  Country  Title   Telephone     e-mail
Don Guillett - 24 May 2005 14:34 GMT
Have a look in HELP index for TRANSPOSE

Signature

Don Guillett
SalesAid Software
donaldb@281.com

> i have a sheet which contains following information
>
[quoted text clipped - 9 lines]
>
> Name  Address City  Zip  Country  Title   Telephone     e-mail
Max - 25 May 2005 07:17 GMT
Perhaps one way to try
(dependent on data structure) ..

Assuming source data is in cols A and B, in groups of 5 lines each, w/o any
blank rows in-between groups, viz.:
(Link to a sample file is provided below)

Name1 Last name1
Address1 Title1
City1 Telephone1
Zip1 e mail1
Country1
Name2 Last name2
Address2 Title2
City2 Telephone2
Zip2 e mail2
Country2
Name3 Last name3
Address3 Title3
City3 Telephone3
Zip3 e mail3
Country3
etc

Put in D1: =OFFSET($A$1,ROWS($A$1:A1)*5-5+COLUMNS($A$1:A1)-1,)
Copy D1 across to H1

Put in B1: =OFFSET($B$1,ROWS($A$1:A1)*5-5+COLUMNS($A$1:B1)-1,)
Copy B1 across to K1

Select D1:K1, fill down until zeros appear,
signalling exhaustion of data from cols A and B

Freeze the results in cols D to K
with a copy > paste special > values > OK
either in-place or elsewhere

The results will be returned in the desired format:
Name1 Address1 City1 Zip1 Country1 Title1 Telephone1 e mail1
Name2 Address2 City2 Zip2 Country2 Title2 Telephone2 e mail2
Name3 Address3 City3 Zip3 Country3 Title3 Telephone3 e mail3
etc

Here's a sample file with the implemented construct:
http://flypicture.com/p.cfm?id=52841
(Right-click on the link: "Download File"
at the top in the page, just above the ads)
File: Gautam_newusers_1.xls
Signature

--
Rgds
Max
xl 97
---
GMT+8,  1° 22' N  103° 45' E
xdemechanik <at>yahoo<dot>com
----

> i have a sheet which contains following information
>
[quoted text clipped - 9 lines]
>
> Name  Address City  Zip  Country  Title   Telephone     e-mail
Max - 30 Jun 2005 06:18 GMT
Here's a new link to the sample file
with the implemented construct:
http://www.savefile.com/files/3671927
File: Gautam_newusers_1.xls
Signature

--
Rgds
Max
xl 97
---
GMT+8,  1° 22' N  103° 45' E
xdemechanik <at>yahoo<dot>com
----

Max - 30 Jun 2005 08:24 GMT
Sorry, typo in the 2 lines just discovered:

> Put in B1: =OFFSET($B$1,ROWS($A$1:A1)*5-5+COLUMNS($A$1:B1)-1,)
> Copy B1 across to K1

Should read as:
Put in I1: =OFFSET($B$1,ROWS($A$1:A1)*5-5+COLUMNS($A$1:B1)-1,)
Copy I1 across to K1

Signature

--
Rgds
Max
xl 97
---
GMT+8,  1° 22' N  103° 45' E
xdemechanik <at>yahoo<dot>com
----

 
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.