Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete rows if data changes in particular column
Hi, I'm seeking assistance with a macro. I'm trying to delete subsequent
rows if data in a particular cell in Column B changes. I need to create a macro because there are thousands of products and using autofilter to sort and delete would take a while. Any assistance would be greatly appreciate, thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete rows if data changes in particular column
More info
-- Don Guillett Microsoft MVP Excel SalesAid Software "jscorsone" wrote in message ... Hi, I'm seeking assistance with a macro. I'm trying to delete subsequent rows if data in a particular cell in Column B changes. I need to create a macro because there are thousands of products and using autofilter to sort and delete would take a while. Any assistance would be greatly appreciate, thanks! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete rows if data changes in particular column
Sure, I didn't explain that very well.
I have 6 columns of data, thousands of rows of data. Columns B, C, D, E, F will change. The column I'm concerned with is Column B, Item Number. There are multiple rows of data with the same Item Number (Column B.) I'd like to delete all rows after the first row for a particular item name, until Column B changes to a new number. "Don Guillett" wrote: More info -- Don Guillett Microsoft MVP Excel SalesAid Software "jscorsone" wrote in message ... Hi, I'm seeking assistance with a macro. I'm trying to delete subsequent rows if data in a particular cell in Column B changes. I need to create a macro because there are thousands of products and using autofilter to sort and delete would take a while. Any assistance would be greatly appreciate, thanks! |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete rows if data changes in particular column
That's exactly what I needed. Thanks so much for your assistance!
"Don Guillett" wrote: for 1 1 1 2 2 3 this will leave 1 2 3 Sub deletedups() mc = "b" For i = Cells(Rows.Count, mc).End(xlUp).Row To 2 Step -1 If Cells(i - 1, mc) = Cells(i, mc) Then Rows(i).Delete Next End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "jscorsone" wrote in message ... Sure, I didn't explain that very well. I have 6 columns of data, thousands of rows of data. Columns B, C, D, E, F will change. The column I'm concerned with is Column B, Item Number. There are multiple rows of data with the same Item Number (Column B.) I'd like to delete all rows after the first row for a particular item name, until Column B changes to a new number. "Don Guillett" wrote: More info -- Don Guillett Microsoft MVP Excel SalesAid Software "jscorsone" wrote in message ... Hi, I'm seeking assistance with a macro. I'm trying to delete subsequent rows if data in a particular cell in Column B changes. I need to create a macro because there are thousands of products and using autofilter to sort and delete would take a while. Any assistance would be greatly appreciate, thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Delete Rows if any cell in Column H is blank but do not Delete Fir | Excel Programming | |||
Delete Rows Where Value in Column V is Less than 2.5? | Excel Programming | |||
Delete rows with nothing in Column B | Excel Programming | |||
delete rows using macro when no data in column | Excel Programming | |||
Delete All Rows That Column A value is not in Column A of Sheet2 | Excel Programming |