Excel数据验证 [英] Excel Data Validation
本文介绍了Excel数据验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Ferrari,Mclaren,Red Bull
,如果我为列表命名 - F1,并将它在数据验证中弹出一个错误 - 列表源必须是分隔列表,或引用单行或柱。
有没有解决方法?
解决方案
AFAIK的唯一方法是将单元格范围转换为分隔字符串...
activecell.Validation.Add xlValidateList ,,, Join(array([a2],[a5],[a8]),,)
列表分隔符取决于您的区域设置,逗号或分号(文件>选项>高级>使用系统分隔符)
Consider having a list - Ferrari, Mclaren, Red Bull
on A2, A5, A8 cells, if i make a name for the list - "F1", and put it in data validation it pops up an error -
"The list source must be a delimited list, or reference to single row or column".
Is there any workaround?
解决方案
AFAIK the only way is to convert your range of cells to a delimited string...
activecell.Validation.Add xlValidateList,,,Join(array([a2],[a5],[a8]),",")
The list separators are dependent on your locale settings, comma or semicolon (File > Options > Advanced > Use system separators)
这篇关于Excel数据验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文