excel比较单元格值函数还是vb脚本? [英] excel compare cell value function or vb script?

查看:122
本文介绍了excel比较单元格值函数还是vb脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一张excel表,其中有几个名称只有一年的单元格(例如2012),我想要一个excel函数来比较年份单元格(我已将其声明为数字,它不是满的只有年份的日期),如果它低于例如。 2012将结果显示在不同的工作表中或将颜色显示为红色或其他内容。有没有excel功能或需要一个vbscript?



谢谢

Kyriakos

I have an excel sheet wich has several names with a cell with the year only (eg. 2012), I want to have an excel function which will compare the year cell (I have declare it as number, it is not full date only year) and if it is lower than eg. 2012 to display the results in a different sheet or color the rows as red or something. Is there any excel function or needs a vbscript?

Thank you
Kyriakos

推荐答案

如果你想为行本身上色,那么你需要使用条件格式(这是啰嗦来解释究竟该做什么,但谷歌提取了很多很好的教程和提示)



不幸的是你不能使用条件格式来引用不同的表格,当然如果你想将数据复制或移动到另一张表格,你需要编写一个VBA脚本并有一个按钮或其他东西来运行宏
If you want to colour the rows themselves then you need to use "Conditional Formatting" (It''s long-winded to explain exactly what to do but google pulls up lots of good tutorials and tips)

Unfortunately you can''t use conditional formatting to refer to a different sheet, and certainly if you wanted to copy or move the data to another sheet you will need to write a VBA script and have a button or something to run the macro


这篇关于excel比较单元格值函数还是vb脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆