VBA Question - Multiple Combinations

dentothep

New Member
Joined
Jan 18, 2018
Messages
1
Hi,

I am new to this forum & hoping somebody can save my day :) (I also have close to zero experience with macros).

I have a macro which goes like this:


Case "TA"


Sheets("Conversion").Cells(a, 2).Value = "20100802;xxxx
Sheets("Conversion").Cells(a, 2).Value = "20100803;xxx
Sheets("Conversion").Cells(a, 2).Value = "20100804;xx
Sheets("Conversion").Cells(a, 2).Value = "20100805;xxx
Sheets("Conversion").Cells(a, 2).Value = "20100806;xxx
Sheets("Conversion").Cells(a, 2).Value = "20100807;xxx

In my data entry sheet, I want to add a column where I can enter "2" or "23456" or any combination of numbers between 2 & 8.

When the excel runs, I would like it to give values which are included in the cell.. for example if there is only a 2, I would like the result of only

Case "TA"


Sheets("Conversion").Cells(a, 2).Value = "20100802;xxxx

Any recommendations on how I can integrate this into the macro?
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,225,757
Messages
6,186,850
Members
453,379
Latest member
gabriellegonzalez

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