Excel VBA macro, search - accumulate - delete original

V

VictorP

I have a workbook with 5 columns and a number of rows that looks lik
this:
A B C D E F
1 X 0 0 0
2 V U 2 3 4
3 Y 0 0 0
4 U 5 6 7
5 Z 0 0 0
...

What I am trying to accomplish is a macro (or any other method) to firs
search the B-column after any value(Isblank?) and when it finds a valu
in the B column, use this value and search for the same value in th
A-column.
Then It should create a new row with the values(text string) from bot
A-column cells, in this case V + U entered in the C-column and add th
values from the D,E,F columns of both the first row where it found th
value in the B-column and the second row where it found the value in th
A column.
After this is done, both the original rows should be deleted and onl
this new row should exist.
After this, it should continue and search in the B-column for the nex
value and repeat this process.

Below is my preferd output:

A B C D E F
1 X 0 0 0
2 Y 0 0 0
3 Z 0 0 0
4 V+U 7 9 11
...


I hope you understand what I am trying to explain :)
Is this possible
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top