将vba与excel电子表格结合使用 [英] using vba with excel spreadsheet
本文介绍了将vba与excel电子表格结合使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当使用If(logical_test,value_if_true,value_if_false)函数时,我可以让它显示另一个单元格中存在的日期值而不是任何单词 我选择在"value_if_true"中插入函数的一部分。
when using the If(logical_test,value_if_true,value_if_false) function can I make it display the date value present in another cell instead of any words I choose to insert in the "value_if_true" section of the function.
推荐答案
当然 - 例如,如果您在A2和B2中有两个日期,则此工作表公式将显示较早的日期。将单元格格式化为您喜欢的日期格式:
Sure - For example,if you have two dates in A2 and B2, this worksheet formula will show the earlier date. Format the cell for the date format that you prefer:
= IF(B2> A2,A2,B2)
=IF(B2>A2,A2,B2)
在VBA中,您将使用类似的结构:
In VBA, you would use a similar construct:
这篇关于将vba与excel电子表格结合使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文