我们可以检查哪种自定义类型应用于Excel表中的单元格
I have an Excel sheet where 2 different Custom Type is applied for one column. How can I differentiate between those two? Is it possible using =IF
? If so what condition do I need to use? I tried =TYPE(G7)
but it gave Numeric for both. There is no formula for the cells.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您无法使用工作表函数来确定这一点,但是使用用户定义的函数很简单:
要输入此用户定义的函数(UDF), alt-f11 打开Visual Basic Editor。
确保您的项目在项目Explorer窗口中突出显示。
然后,从顶部菜单中选择
insert/Module
和将代码粘贴到打开的窗口中。
要使用此用户定义的函数(UDF),请在某些单元格中输入一个公式,例如
= nf(cell_reference)
。这将单元格式返回文本字符串。因此,要确定它是否是CR,
可以用作逻辑测试
I don't think you can determine that with a Worksheet Function, but it is simple with a User Defined Function:
To enter this User Defined Function (UDF), alt-F11 opens the Visual Basic Editor.
Ensure your project is highlighted in the Project Explorer window.
Then, from the top menu, select
Insert/Module
andpaste the code below into the window that opens.
To use this User Defined Function (UDF), enter a formula like
=NF(cell_reference)
in some cell.This returns the cell format as a text string. So to determine whether it is a Cr, something like
can be used as a logical test