#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default MC3

I have a worksheet and Columns A:C have contents in them. The contents in
every row belong together. So A1, B1, and C1 belong together, A2, B2, and C2
belong together and so on.

Every cell in Column A typically has between 10 and 15 characters.
Every cell in Column B has between 30 and 35 characters.
Every cell in Column C has 1 number in it which could be one or two digits.

Id like to create a macro that will search column A:B. Every time a
character is repeated in Column A:B, I want to delete that row but take the
number in Column C that is associated to the row that was deleted and add it
to the quantity in Column C of the original character in Column A:B that was
identical but did not get deleted.

I pasted the code I currently have, but its not really doing the job. Might
you help me?

Sub MCThree
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase, SourceData:= _
"Sheet1!R1C1:R35C3").CreatePivotTable TableDestination:= _
"'[Sheet 2]Sheet1'!R1C5",
TableName:= _
"PivotTable1", DefaultVersion:=xlPivotTableVersion10
With ActiveSheet.PivotTables("PivotTable1").PivotFields ("a")
..Orientation = xlRowField
..Position = 1
End With
With ActiveSheet.PivotTables("PivotTable1").PivotFields ("b")
..Orientation = xlRowField
..Position = 2
End With
ActiveSheet.PivotTables("PivotTable1").AddDataFiel d
ActiveSheet.PivotTables( _
"PivotTable1").PivotFields("c"), "Sum of c", xlSum
ActiveWorkbook.ShowPivotTableFieldList = False
End Sub

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"