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: 17
  • Screenshot 2023-03-01 095214.png
    Screenshot 2023-03-01 095214.png
    45 KB · Views: 18

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,216,759
Messages
6,132,551
Members
449,735
Latest member
Gary_M

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