I originally posted a request for help with sorting, matching and adding data. JLGWhiz responded with the macro shown below. It works great and I really appreciate it. The problem I am having is getting it to work on the rows and columns of the sheet I need it to. The data is on sheet footing starting on row 127 through row 141 in Column B, C and D (see below example of data). I would like for the answer to show up starting on row 143 through 157 in the same column B, C and D. There is data above these rows but no data is below row 142 if this helps. Also I would like to use the same macro on another sheet. Sheet is FTG & Wall in the same folder. The data starts on row 284 through 298 Column B, C and D. I would like the answer to start in row 300 through 314 in column B, C and D. On this sheet there is data above and below these rows.
<tbody>
</tbody>
I don’t know how to contact JLGWhiz directly. So If I have made a mistake by posting this in this manned I am sorry. I am new at this but I want to follow the rules. I really appreciate the help I have received.
9" x 3' | 3 | 25 |
12" x 2'6" | 4 | 40 |
10" X 4' | 5 | 33.3333 |
8" x 2' | 3 | 50 |
9" x 3' | 3 | 50 |
8" x 2' | 3 | 25 |
6" x 1'6" | 5 | 50 |
6" x 1'6" | 5 | 25 |
10" x 4' | 5 | 50 |
12" x 2'6" | 4 | 33.3333 |
0 | 0 | #DIV/0! |
0 | 0 | #DIV/0! |
0 | 0 | #DIV/0! |
0 | 0 | #DIV/0! |
0 | 0 | #DIV/0! |
1. Sub consItems()
2. Dim sh As Worksheet, lr As Long, sCell As Range
3. Set sh = Sheets(1) 'edit sheet name
4. lr = sh.Cells(Rows.Count, 1).End(xlUp).Row
5. sh.Range("A2:A" & lr).EntireRow.Sort Range("A1"), xlAscending
6. For i = lr To 2 Step -1
7. With sh
8. Set sCell = .Cells(i - 1, 1).Offset(0, 2)
9. If Trim(.Cells(i, 1).Value) = Trim(.Cells(i - 1, 1).Value) Then
10. sCell = sCell.Value + sCell.Offset(1, 0).Value
11. Rows(i).Delete
12. End If
13. End With
14. Next
End Sub2. Dim sh As Worksheet, lr As Long, sCell As Range
3. Set sh = Sheets(1) 'edit sheet name
4. lr = sh.Cells(Rows.Count, 1).End(xlUp).Row
5. sh.Range("A2:A" & lr).EntireRow.Sort Range("A1"), xlAscending
6. For i = lr To 2 Step -1
7. With sh
8. Set sCell = .Cells(i - 1, 1).Offset(0, 2)
9. If Trim(.Cells(i, 1).Value) = Trim(.Cells(i - 1, 1).Value) Then
10. sCell = sCell.Value + sCell.Offset(1, 0).Value
11. Rows(i).Delete
12. End If
13. End With
14. Next
I don’t know how to contact JLGWhiz directly. So If I have made a mistake by posting this in this manned I am sorry. I am new at this but I want to follow the rules. I really appreciate the help I have received.