如何让这个excel公式在访问中工作? [英] How can I get this excel formula to work in access?

查看:86
本文介绍了如何让这个excel公式在访问中工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何让这个excel公式在访问中工作我知道字段名称取代了单元格引用?


示例:时钟输出时钟=工作总时间

How can I get this excel formula to work in access I know that the field name replaces the cell reference?

Example: Clock In Clock Out = Total Time Worked

展开 | 选择 | Wrap | 行号

推荐答案

如果您在查询中表示

擅长
if(condition,true,false)
访问中的

iif(条件,真,假)



所以基本上带你公式

改变if if iif

更改单元格引用到字段引用

将或部分更改为(H9 =""或者G9 ="")


和你完成的


这样的事情(未经测试)
If you mean in a query then
excels
if(condition,true,false)
in access is
iif(condition,true,false)


so basically take you formula
change if to iif
change the cell references to field references
change the or part to (H9="" or G9="")

and your done

something like this (untested)
展开 | 选择 | < span class =codeLinkonclick =WordWrap(this);> Wrap | 行号


如果在vba

excels

if(condition,true,false)

进入是


如果条件那么

真实陈述

其他

false声明

结束如果


so
If in vba
excels
if(condition,true,false)
in access is

if condition then
true statements
else
false statements
end if

so
< span class =codeLinkonclick =Blur(this,this.parentNode.parentNode,getChi ldren(this),true);>展开 | 选择 | Wrap | 行号


这不对,我害怕Delerna。


Access和Excel VBA在这方面是相同的。两者都有 If 构造以及 IIf()函数。它们的不同之处在于您在第一个回复中的建议 - Excel公式使用 IF(),而Access公式使用 IIf()(就像在VBA中一样)。您不能在Access(或任何)VBA中使用 0 的行。


我担心这个问题非常基础它的信息,让我们很少工作,但一般来说Access IIf()函数调用可以包含更复杂的布尔表达式,必须使用 OR() AND() Excel公式中的函数引用。然后可以将此公式写入Access(公式参考而不是VBA)中:
That''s not right I''m afraid Delerna.

Access and Excel VBA are the same in this respect. Both have If constructs as well as the IIf() function available to them. Where they differ is as you suggested in your first reply - Excel formulas use IF(), whereas Access formulas use IIf() (just as in VBA). You can''t have a line in Access (or any) VBA which just says 0.

I''m afraid the question is very basic in its information, leaving us very little to work from, but in general an Access IIf() function call can include more complex boolean expressions which must be handled using OR() or AND() function references in an Excel formula. This formula could then be written in Access (a formula reference rather than VBA) as :
展开 | 选择 | Wrap | 行号


这篇关于如何让这个excel公式在访问中工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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