Macro writing

  • Thread starter Thread starter Pilgrim
  • Start date Start date
P

Pilgrim

I understand the concept of macros, I just don't know how they execute and
the possible functions.
I would like to import a considerable amount of data from excel into access.
The problem I have is that the information I want to import for each record
is on two adjacent rows. I need a macro that will move the data contained
in just one cell to the end of the row above it and then delete the row
that, that information was contained in. Then I need it to repeat that
function on every other row. Sounds easy right? Way my luck runs you could
do anything you want to do except what I need. Anyone know how to do this?
Or direct me to a site I could research it to do it on my own.

Mike
 
Pilgrim,

If you want a macro written to do this, you'll have to provide more info.
Describe the rows, where stuff is, etc. Give some example rows.
 
You can do it with or without a macro.

Without a macro, assuming all your rows are doubled, and that the data is as per
your attachment, ( which oh by the way is a big no no in a text only newsgroup
such as this - But we're a forgiving lot the first time round :-> ), without you
having sanitised any rows, format Column N as anything but text, and then in
cell N1 put the following formula:-

=C2

and then copy this down as far as your data goes. Now select all of Column N
and do Edit / Copy, then Edit / Paste Special / Values. Now select all of
Column C and do Edit / Go To / Special / Blanks, and then do Edit / Delete /
Entire Row.

Job Done.
 
Back
Top