Code to delete row

uwish7

New Member
Joined
Jul 26, 2017
Messages
26
I want to create a vba code for sheet one that says if color and shape are the same/duplicate, delete the newest one. How would I dim the color and shape? I want to create a button for the user to press to start the sequence.
 
Last edited:

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
I want to create a vba code for sheet one that says if color and shape are the same/duplicate, delete the newest one. How would I dim the color and shape? I want to create a button for the user to press to start the sequence.
The title of your thread says you want to delete a row whereas the description in the thread seems to be saying you want to delete shape... please clarify what you want and provide some more detail about what your existing layout looks like.

A Generalized "Please Note"
--------------------------------------
One thing you must keep in mind when you ask a question in a forum... the people you are asking to help you know absolutely nothing about your data, absolutely nothing about how it is laid out in the workbook, absolutely nothing about what you want done with it and absolutely nothing about how whatever it is you want done is to be presented back to you as a result... you must be very specific about describing each of these areas, in detail, and you should not assume that we will be able to "figure it out" on our own. Remember, you are asking us for help... so help us to be able to help you by providing the information we need to do so, even if that information seems "obvious" to you (remember, it is only obvious to you because of your familiarity with your data, its layout and the overall objective for it).
 
Upvote 0
Please excuse me. Let me explain.
I have 11 rows across. They are listed below. If the color and shape are the same, based on the date, delete the newest date.
So for example if you have August 30 and a circle and purple, Aug 30 will be deleted.
I also want to create a button to start the operation. I know how to create a button but I do not know how to code it. I have Excel 2016. I mainly do not know how to dim. The worksheet is labeled Inventory Out. the shapes can be numerical. The shapes are coded for a numeric number. I hope this helps.



















<tbody>
</tbody>

Date
Shape
Material Description
Color
Cntl
ColorType
Search Criteria
Planner
Notes
Impact
Metric
27-Aug
square
Color Name
purple
z2
x
purpleSquare
Jane
Update Info
None
OUT
27-Aug
circle
ColorName
purple
z6
x
PurpleCircle
Doe
Waiting for update
None -
OUT

<tbody>
</tbody>

If the Shape and Color are the same, based on the date, delete the newest date
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,453
Messages
6,124,918
Members
449,195
Latest member
Stevenciu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top