modifying delete more than item by user inputbox

abdelfattah

Well-known Member
Joined
May 3, 2019
Messages
982
Office Version
  1. 2010
hi, all
i have this code very well but to save time to delete more item using inputbox for instance i have items in col a contains (AA-123,bb-124,CC-1234..etc) so the code delete when i fill one item i would fill like this into input box AA-123 ,bb-124,CC-123 OR AA & BB & CC it supposes deleting them , moreover when i delete some items contain UCASE letters so i would showing message box if i fill LCASE letters so i make choice me the message box " it contains only UCASE letters , do you continue " if press ok then delete if no then ignore it and reverse
VBA Code:
Sub DeleteMyExcelRows()
Dim IDSelect As String
Dim c As Range
Let IDSelect = InputBox("Please Enter The Customer ID you want to delete")
If IDSelect = vbNullString Then Exit Sub
For Each c In Range("A:A")
If c = IDSelect Then c.EntireRow.Delete
Next
End Sub
thanks
 

Some videos you may like

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Watch MrExcel Video

Forum statistics

Threads
1,127,245
Messages
5,623,586
Members
415,981
Latest member
Baltwin

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
Top