Macrocount

M

MCheru

This is the macro I currently have…

Sub Macrocount()
Columns("H:J").Select
Selection.Copy
Sheets.Add
Sheets("Sheet2").Select
Sheets("Sheet2").Name = "Urgent"
Range("A1").Select
ActiveSheet.Paste
Columns("A:A").Select
Application.CutCopyMode = False
Selection.Cut
Columns("D:D").Select
ActiveSheet.Paste
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
End Sub

This is what it is doing….

Copy Columns H:J
Insert new worksheet and name it Urgent
Paste the contents of H:J into cell A1 of the new worksheet
In the new worksheet cut column A and paste it into column D
Delete Column A

Now in the new worksheet…

You have Columns A:C with 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.

I want to modify the code I currently have so that it 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.

Might you help me?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top