将excel公式转换为Access 2010表达式 [英] convert the excel formula into a Access 2010 expression

查看:147
本文介绍了将excel公式转换为Access 2010表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个表,其字段名称为InTime,字段名称为OutTime,其计算字段名称为TotalTime。现在我需要创建一个计算字段名称TotalUnits。

我需要将excel公式转换为Access表达式。我包括等于一个单位的分钟数(如果这有帮助)。


军事时间单位的分钟数

0.13分钟到0.37分钟= 1个单位

0.38分钟到0.62分钟= 2个单位

0.63分钟到0.87分钟= 3个单位

0.88分钟到1.07分钟= 4个单位

1.08分钟到1.37分钟= 5个单位

1.38分钟到1.62分钟= 6个单位

1.63分钟到1.87分钟= 7个单位

1.88分钟到2.13分钟= 8个单位


这是excel的形式:

= IF(I8> 1.88," ; 8,IF(I8> 1.63,7,IF(I8> 1.38,6,IF(I8> 1.13,5,IF(I8> 0.88,4,IF (I8> 0.63,3,IF(I8> 0.38,2,IF(I8> 0.12,1,0)))))))))

I created a table that has a field name InTime and a field name OutTime with a calculated field name TotalTime. Now I need to create a calculated field name TotalUnits.
I need to convert the excel formula into a Access expression. I?m including the numbers of minutes that equal to a unit (if this helps).

Number of Minutes in Military Time Units
0.13 minutes through 0.37 minutes = 1 unit
0.38 minutes through 0.62 minutes = 2 units
0.63 minutes through 0.87 minutes = 3 units
0.88 minutes through 1.07 minutes = 4 units
1.08 minutes through 1.37 minutes = 5 units
1.38 minutes through 1.62 minutes = 6 units
1.63 minutes through 1.87 minutes = 7 units
1.88 minutes through 2.13 minutes = 8 units

This is the excel formual:
=IF(I8>1.88,"8",IF(I8>1.63,"7",IF(I8>1.38,"6",IF(I 8>1.13,"5",IF(I8>0.88,"4",IF(I8>0.63,"3",IF(I8>0.3 8,"2",IF(I8>0.12,"1","0"))))))))

推荐答案

展开 | 选择 | Wrap | 行号


感谢您的快速回复,我尝试过没有结果的表达式。我不断收到以下错误:无法保存表达式,因为服务器不支持其结果类型,如二进制或NULL。我不知道这意味着什么。


我确实将[I8]改为字段名TotalTime,但它没有用。我做错了吗?
Thank you for your quick response, I’ve tried the expression with no results. I keep getting the following error: The expression could not be saved because its result type, such as binary or NULL, is not supported by the server. I have no idea what that means.

I did change the [I8] to the field name TotalTime but it didn’t work. Am I doing something wrong?


发布到目前为止的所有SQL。
Post all the SQL that you have so far.


这篇关于将excel公式转换为Access 2010表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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