View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Uninvisible Uninvisible is offline
external usenet poster
 
Posts: 10
Default Delete a Range After Paste Special

Thank you -- it worked perfectly. But now that I have this and am
using it, I wonder if I can automate my whole process. Essentially, I
have one column of data which needs to be normalized (this was a .pdf
report from a database. The db crashed and now I am trying to
recreate it):

A1 Name
A2 Address
A3 Phone
A4 FIXED DATA
A5 Email
A6 Name
A7 Address
A8 Phone
A9 FIXED DATA
A10 Email
A11 Email
A12 Name
A13 Address
A14 Phone
A15 FIXED DATA
A16 Email

Essentially, I have been highlighting say A1:A5 and then running the
macro, then A6:A11 etc. But, highlighting each is time consuming. Is
there a way to highlight the entire column and have the macro auto-
select a range of fields that make a record (i.e. Name, Address,
Phone, FIXED DATA, E-mail) transpose it and then do the same to the
next record and the next.

There are two considerations with this data set: 1) not every record
has something populated in the e-mail field and 2) some records have
more tha one e-mail. Now, every record has the FIXED DATA field which
contains the exact same fixed value for each value. So, this might be
a delimiter of a sort. The VB would have to essentially say select a
range which consists of the first cell through the last cells to
contain an @ immediately after the "FIXED DATA" cell (and of course,
it will have to look at the cell after the cells with and @ to know
that that is a new record and to not include it in the range) Once
that range is auto-identified, the date would be copied, transposed
and the the next range is selected etc.

Any thoughts? :)