View Single Post
  #1   Report Post  
VictorP VictorP is offline
Junior Member
 
Posts: 1
Default Excel VBA macro, search - accumulate - delete original

I have a workbook with 5 columns and a number of rows that looks like 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 first search the B-column after any value(Isblank?) and when it finds a value in the B column, use this value and search for the same value in the A-column.
Then It should create a new row with the values(text string) from both A-column cells, in this case V + U entered in the C-column and add the values from the D,E,F columns of both the first row where it found the value in the B-column and the second row where it found the value in the A column.
After this is done, both the original rows should be deleted and only this new row should exist.
After this, it should continue and search in the B-column for the next 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?