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

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?

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 09:01 AM.

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

About Us

"It's about Microsoft Excel"