validation list giving error

vineet78

Board Regular
Joined
Oct 22, 2017
Messages
73
I am using a macro to store 100 string values in validation list -strValidList
but when i close workbook and reopen this , i get error as below.
Someone told me it is because length of validation list goes beyond 255 characters.

what should i do, i need to have this validation list greater than 255 and also do you think below error is due to this?
as when i remove this macro, i dont get this error.

1613754511349.png
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Most people only use actual validation lists for a very small number of options, for anything else common practice is to create the list in a worksheet table (sheet hidden if desired) and refer to that as the list source.
 
Upvote 0
Here is a example of how I use a Table as my source for a Data Validation List:
Assuming your table is named Table1

=INDIRECT("Table1")

And as you add more values to the Table the Data Validation list also expands
This assumes your Table is a one column Table
 
Upvote 0
There's no need to use indirect, you can just use the Cell range =$A$2:$A$16 & as long as you originally use the entire table range (less the header) it will expand automatically as data is added.
 
Upvote 0
There's no need to use indirect, you can just use the Cell range =$A$2:$A$16 & as long as you originally use the entire table range (less the header) it will expand automatically as data is added.
With my solution you can use the same source on any sheet in the workbook without having to use sheet names. So you can have 5 data validation lists on 5 different sheets that refer to the same Table
 
Upvote 0
You can easily do that without using a volatile function, just by adding the sheet name to the range.
Excel Formula:
=Lists!$A$2:$A$16
 
Upvote 0
You can easily do that without using a volatile function, just by adding the sheet name to the range.
Excel Formula:
=Lists!$A$2:$A$16
I see no reason why my solution is not a good one. I realize in Excel there are 10 ways or more to do anything
 
Upvote 0
I never said it wasn't good, I was just pointing out an alternative.
 
Upvote 0

Forum statistics

Threads
1,214,849
Messages
6,121,925
Members
449,056
Latest member
denissimo

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