Excel 2007 - macros
Solved/Closed
Regina
-
Jul 14, 2011 at 04:30 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jul 15, 2011 at 06:06 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jul 15, 2011 at 06:06 AM
Related:
- Excel 2007 - macros
- Save as pdf office 2007 - Download - Other
- Macros in excel download free - Download - Spreadsheets
- Excel mod apk for pc - Download - Spreadsheets
- Number to words in excel - Guide
- Kernel for excel - Download - Backup and recovery
1 response
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Jul 14, 2011 at 06:34 AM
Jul 14, 2011 at 06:34 AM
you can do a sumif
Jul 15, 2011 at 04:20 AM
Jul 15, 2011 at 04:57 AM
Sub Disk1()
Dim lRow As Long
Dim ItemRow1, ItemRow2 As String
Columns("A:B").Select
Selection.Copy
Sheets("Sheet1").Select
Range("A1").Select
ActiveSheet.Paste
Cells.Select
Selection.Sort _
Key1:=Range("A2"), Order1:=xlAscending, _
Key2:=Range("B2"), Order2:=xlDescending, _
Header:=xlYes, OrderCustom:=1, _
MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
lRow = 2
Do While (Cells(lRow, 1) <> "")
ItemRow1 = Cells(lRow, "A")
ItemRow2 = Cells(lRow + 1, "A")
If (ItemRow1 = ItemRow2) Then
Cells(lRow, "B") = Cells(lRow, "B") + Cells(lRow + 1, "B")
Rows(lRow + 1).Delete
Else
lRow = lRow + 1
End If
Loop
End Sub
Jul 15, 2011 at 06:06 AM
ItemRow1 = Cells(lRow, "A")
ItemRow2 = Cells(lRow + 1, "A")
to
ItemRow1 = UCase(Cells(lRow, "A"))
ItemRow2 = UCase(Cells(lRow + 1, "A"))