Grouping similar items under one variable

topswim

Board Regular
Joined
May 14, 2002
Messages
133
Office Version
  1. 365
Platform
  1. Windows
I've been trying to group similar items in one type of variable or array but I'm having issues getting that to work. I have included screen prints of the code and the sheet I'm working with in summary what I'm trying to do is as follows:

when I run the code I want it to clear values in X that are Verifone shipped, Verifone Returned and Stripe Warehouse Inventory. I know I can create "or" to reference each one, but wanted t try and group these three under one umbrella and shorten the code. I have also tried creating variables for each one (ex- VS for Verifone Shipped, VR for Return, etc, but they are not recognized when I run the macro. I I have tried a few different methods but the only thing that works is if I type in the full name (ex- Verifone Shipped) of the device then will update accordingly. Thank you in advance
 

Attachments

  • Screenshot 2023-03-01-2 of 2.png
    Screenshot 2023-03-01-2 of 2.png
    59.8 KB · Views: 35
  • Screenshot 2023-03-01 095214.png
    Screenshot 2023-03-01 095214.png
    45 KB · Views: 28

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Forum statistics

Threads
1,223,893
Messages
6,175,249
Members
452,623
Latest member
Techenthusiast

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