modifying delete more than item by user inputbox

abdelfattah

Well-known Member
Joined
May 3, 2019
Messages
1,429
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
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
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Forum statistics

Threads
1,214,991
Messages
6,122,628
Members
449,095
Latest member
bsb1122

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