Thank you for following up. Essentially, I converted a PDF to excel
and all of the data looks as follows:
A1 Erica Smith
A2 Vice President
A3 Company, Inc.
A4 710 Bridgeport Avenue
A5 Southfield, MI 48076
A6 (555)555-5555
A7 (555)555-5555
A8 E-Mail Address Associated Contact Created By Date
A9
(E-Mail Removed) EGOKCE 03/08/06
A10 Darby Smith
A11 Vice President
A12 Company, Inc.
A13 710 Bridgeport Avenue
A14 Southfield, MI 48076
A15 (555)555-5555
A16 E-Mail Address Associated Contact Created By Date
A17
(E-Mail Removed) CATALOGS 03/08/06
A18
(E-Mail Removed) HINGERMA 03/22/06
A19 Carol Smith
A20 Vice President
A21 Company, Inc.
A22 710 Bridgeport Avenue
A23 Southfield, MI 48076
A24 (555)555-5555
A25 E-Mail Address Associated Contact Created By Date
Basically, I used the above macro to copy cells A1:A9 and then
transpose them to another part of the worksheet so I could normalize
the data and recreate the database. There are over 30,000 records, so
to do this all day is time consuming. What I am interested in doing is
revising the code above to include a loop which would run down the
entire A column, auto select a range, copy it, paste it, delete it and
then move down to select the next range until all records have been
transposed. Every range of cells has the following data element in
it: E-Mail Address Associated Contact Created By Date (this was a
column header on the pdf report). Following that there is a cell with
an email address. After the e-mail addresses, a new record starts.
In some instances, a record may have more than one e-mail (see
A17:A18) and in others, none at all (A25). Since the copied range is
deleted after it is pasted, the idea would be for the VB to start the
range with the first cell in Column A that has data in it and close it
using the e-mail address. The related e-mail address could be found
by using the @ as the key character as well as a condition indicating
that the first cell after the E-Mail Address Associated Contact
Created By Date that does not have an @ would be the start of the next
record. Thus, the range would now be identified and then copied,
transposed and then deleted. The loop would continue until all
records are transposed. As I am a novice with VB, taking a while to
figure out how to do this...