![]() |
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? |
All times are GMT +1. The time now is 03:44 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com