Yes, that can be done.
You can get a good framework for that by using the macro recorder to record your manual steps.
If you'd like some help with that please..
1. Provide the name of the Slicer
2. Clarify the mapping between the value in A1 and the Slicer Items to be Selected. (you provided an example, but you'll run out of letters before getting to A1=12). Can you provide an example that is more like your actual case? If there isn't a clear pattern like your example, you'll need to store the mapping somewhere (perhaps in the VBA code itself, or in a lookup table in your workbook).