ccollins917
New Member
- Joined
- Oct 8, 2015
- Messages
- 7
I need a vba code for the following. If I have the below
Column W is a concatenate function.
1 Column V Column W
2 -51474.79
3 -51474.79
4 0.00 1401
5 0.00
6 0.00
7 0.00 1402
8 0.00
9 0.00
10 0.00 1403
11 -563619.13
12 -563619.13
13 0.00 1405
14 -604892.10
15 -604892.10
16 0.00 1408
17 40731.03
18 40731.03
19 0.00 1401
3182.94
0.00
0.00 1402
0.00
0.00
0.00 1403
444346.54
444346.54
0.00 1405
486471.66
486471.66
0.00 1408
1299.86
1299.86
For r=2 to lastRow
Look in column w (Cells(r,22) to match 1401 to cells in same column, cells(i,23) next item with ID 1401 to the next match, then add both to offset cells(I,-1). End result: Cells(4,lastRow-1)51474.79(cells(3,22))+40731.03(Cells(17,22))= -10743.76 (Cells(4,22))
Column W is a concatenate function.
1 Column V Column W
2 -51474.79
3 -51474.79
4 0.00 1401
5 0.00
6 0.00
7 0.00 1402
8 0.00
9 0.00
10 0.00 1403
11 -563619.13
12 -563619.13
13 0.00 1405
14 -604892.10
15 -604892.10
16 0.00 1408
17 40731.03
18 40731.03
19 0.00 1401
3182.94
0.00
0.00 1402
0.00
0.00
0.00 1403
444346.54
444346.54
0.00 1405
486471.66
486471.66
0.00 1408
1299.86
1299.86
For r=2 to lastRow
Look in column w (Cells(r,22) to match 1401 to cells in same column, cells(i,23) next item with ID 1401 to the next match, then add both to offset cells(I,-1). End result: Cells(4,lastRow-1)51474.79(cells(3,22))+40731.03(Cells(17,22))= -10743.76 (Cells(4,22))