Select Case Scenario

Skybluekid

Well-known Member
Joined
Apr 17, 2012
Messages
1,226
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I am using a multiple Select Case Statement in vba. What I would like is if in the loop, it sees the word "Delete", then select the case Delete. In the case delete, I would like it to go straight back to the loop.

Thanks in Advance
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
What I have on a sheet is a down load from a database. From the download, I have to copy items to several different sheets and some which I ignore. In order speed things up, I have created a helper column which will look at certain criteria and then show either Damage, OCS, Depot or Delete. I have created a macro, using Case Statement within a loop, that will look at the helper column and then call the relative procedure to copy that line an paste it in the relevant worksheet within the workbook. My Question was, the macro came across the word Delete, I noticed that it was going through the whole list of procedures before moving on. I wanted to know if there was a way of not scrolling down the list. I solved the issue by creating a Case Statement called Delete, with that I used the Goto Statement to bypass all the other cases.
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,851
Members
449,051
Latest member
excelquestion515

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