将价值与另一个工作簿进行比较,并与2个规则进行比较
我一直在尝试使用VBA检查情况,但现在我正在挣扎 这是我在做什么的说明
- ,如果有任何“取消选中”条件(a)列
,那么目标是 data2和data4之间的比较(该本身的数据本身取消选中条件) data2和data2在另一个工作簿(Photo2)(不是另一个工作表)
要将其与另一个工作簿(Photo2)进行比较,我需要比较 data2(c)中的值(photo1) data中是否存在2在另一个工作簿(Photo2)中,我们得出的结论是,不作为f列中的最终结果
例如,您可以看到A5& Photo2中的A7通过第一条规则,因为它们具有与C5&amp相同的值C7
这是困难的部分,当它通过3时。 但是规则是值不需要完全相同。但是,如果如果另一个工作簿中的data4值(photo2) 不超过50,则与相比最终结果
,例如,您可以从3中看到。)A5& A7通过规则,但在4中。 A5具有220次通过,因为差异为20,与200相比 范围150-250(200+-50)
photo1
photo2
是否有任何公式/vlookup/vba或其他运行的公式?
I have been trying to check the condition using VBA, but now I am struggling
here is the explanation of what I am doing
if there's any 'uncheck' on condition(A) column
then, The objective is comparison between data2 and data4 (which is the data of that itself uncheck condition) with data2 and data4 in another workbook (photo2) (not another worksheet)
To compare it to another workbook (photo2), I need to compare whether the value in data2(C) column in (photo1) exists in data 2 in another workbook (photo2) if not we conclude that not pass as a final result in F column
for example, as you can see A5 & A7 in photo2 pass 1st rule because they have the same value as C5 & C7
here is the difficult part, when it pass 3.) rule, then I need to compare data4(E) column in (photo1) to data4 in another workbook (photo2)
But the rule is the value does not need to be exactly the same. however if the data4 value in another workbook (photo2) isn't more/less than 50 compare to the value in data4 in photo1 then we conclude that pass as a final resultfor example, as you can see from 3.) A5 & A7 pass rule but in 4.) only
A5 with 220 pass because the difference is 20 compare to 200 which in
range 150-250 (200+-50)
photo1
photo2
Is there any formula/vlookup/vba or whatever to run it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您的工作表中有以下数据
工作表

photo1
工作表

photo2
您可以在
result
中使用此公式在f列中说明该公式
该部分
if(iSERROR(iserror(c2,photo2!a:a code>)) ,0))))
检查data2
是否存在photo2
如果没有匹配并返回错误(如果没有错误<代码) >不(IsError 它将检查以下内容:where
index(photo2!b:b,match(c2,photo2!a:a,0))
将拉动data4
来自photo2
的值,与data2
从photo1
与data2
从Photo2匹配
带有匹配(C2,Photo2!a:a,0)
。 > ABS ,并测试这是&lt; = 50
。if you have the following data in your worksheets
Worksheet

Photo1
Worksheet

Photo2
you can use this formula in
result
in column FExplanation what the formula does
This part
IF(NOT(ISERROR(MATCH(C2,Photo2!A:A,0)))
checks ifdata2
exists inPhoto2
if not it does not match and returns an error (not pass) if there is no errorNOT(ISERROR
it will check the following:Where
INDEX(Photo2!B:B,MATCH(C2,Photo2!A:A,0))
will pull thedata4
value fromPhoto2
by matching thedata2
fromPhoto1
with thedata2
from thePhoto2
withMATCH(C2,Photo2!A:A,0)
. Then subtractdata4
fromPhoto1
get the absolute valueABS
of it and test if this is<=50
. Then it ispass
otherwise not.