我正在尝试记录将执行此操作的Excel宏:
我有2个工作表。 '工作表'和'Report 1'。我正在寻找的方案是,
如果Report 1 AB列为空,Worksheet F列将使用报告1中的数据U列。如果它有文本,Worksheet F列将使用报告1> AC列中的数据。
我尝试了不同的公式。起初我将整个列范围用作公式,将空白设为0,并尝试。但是我的结果是0.我也试图去除范围并使用一个单元格,但它仍然不起作用。那么我的公式怎么了?
= IF('Report 1'!AB5 =,Worksheet!F6 =报告1'!AC5,Worksheet!F6 ='Report 1'!U5)如果我想实现上述情况,我的公式是否也是正确的?
解决方案= IF('Report 1'!AB5 =,'Report 1'!U5,'Report 1'!AC5)
将公式上方放在单元格F6中的工作表中
请尝试。
编辑答案如下:
= IF('Report 1'!AB5 =,'Report 1'!U5,'Report 1'! AC5) 如果您没有任何文本为空白。
= IF('Report 1'!AB5 = 0,'Report 1'!U5,'Report 1'!AC5) 如果要将0设置为空白。
或...您可以使用它们在1个公式中使用或
= IF(OR('REPORT 1'!AB5 = 0,'REPORT 1'!AB5 =报告1'!U5,'REPORT 1'!AC5)
或...
5 $ / code code code code code $ >
I am trying to record a Excel macro that will be conducting this action:
I have 2 worksheets. 'Worksheet' and 'Report 1'. The scenario I am seeking for is,
"If Report 1 AB column is blank, Worksheet F column will use the data in >Report 1 U column. If it has text, Worksheet F column will use data in Report 1 > AC column."
I have tried out different formulas. At first I used the whole column range as formula, putting blank as 0 and also trying " ". But the result I have is 0. I also tried to remove ranges and use one cell but it still does not work. So what is wrong with my formula?
=IF('Report 1'!AB5=" ", Worksheet!F6='Report 1'!AC5, Worksheet!F6='Report 1'!U5)In the first place, is my formula even correctly structured if I want to achieve the scenario above?
解决方案 =IF('Report 1'!AB5="",'Report 1'!U5,'Report 1'!AC5)Place above formula into cell F6 at sheet "Worksheet"
Please try.
edited answer below:
=IF('Report 1'!AB5="",'Report 1'!U5,'Report 1'!AC5) if you have no text at all as your "blank".
=IF('Report 1'!AB5=0,'Report 1'!U5,'Report 1'!AC5) if you want to set 0 as your "blank".
or... you can use both of it in 1 formula by using "or"
=IF(OR('REPORT 1'!AB5=0,'REPORT 1'!AB5=""),'REPORT 1'!U5,'REPORT 1'!AC5)
or...
=IF(ISBLANK('Report 1'!AB5),'Report 1'!U5,'Report 1'!AC5)
更多推荐
我的配方有什么问题?
发布评论