热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

理解VBScript“RC18”用于解码公式-UnderstandingVBScript“RC18”fordecodingtheformula

iammakinganapplicationforwhichihavetoreadtheformulasfromexcel.Aftermanysearchiwas

i am making an application for which i have to read the formulas from excel. After many search i was able to read the formula behind a field. But i was not able to understand it. Can somebody help me in this regard?

我正在申请我必须从excel阅读公式。经过多次搜索,我能够阅读一个字段背后的公式。但我无法理解它。有人可以在这方面帮助我吗?

Formula is

ActiveCell.Offset(0, 5).FormulaR1C1 = "=RC18-3*(AVERAGE(C19)/1.128)"

Actually i am not uderstanding what is RC18 and C19 at clicking the specific fields it gives this formula.

实际上我并不了解RC18和C19在点击它给出这个公式的特定字段时是什么。

=$R27-3*(AVERAGE($S:$S)/1.128)

how RC18 = $R27

RC18 = $ R27

2 个解决方案

#1


3  

That's Relative Cell Reference. R/C do not mean a cell address.

这是相对细胞参考。 R / C不代表单元格地址。

RC18 means "The cell in the same row, column 18"

RC18表示“同一行中的单元格,第18列”

In relative reference R means "row" and without a number next to it, means the same row as the cell wherein the formula resides. (an R without a C would mean the entire row, e.g., R1 would be Row 1.)

在相对参考中,R表示“行”而旁边没有数字,表示与公式所在的单元格相同的行。 (没有C的R意味着整行,例如,R1将是第1行。)

C18 means column 18. Similarly, without the C19 means Column 19, or, column S.

C18表示第18列。类似地,没有C19表示第19列,或第S列。

Using square brackets for the number indicates an offset, where negative would be a left offset (columns) or an up offset (rows), and otherwise offsets are right (columns) and down (rows), so:

对数字使用方括号表示偏移,其中负数为左偏移(列)或向上偏移(行),否则偏移为右(列)和向下(行),因此:

R[1]C[1]

Would be the cell one row below and one column to the right of the active cell, and likewise:

将是活动单元格右下方的一行和一列的单元格,同样如下:

R[2]C[-3]

Would be the cell two rows below and three columns left of active cell.

将是活动单元格下方两行和三列左侧的单元格。

#2


0  

That's because the formula is built by using R1C1 notation as explained here and here(external)

这是因为公式是使用R1C1表示法构建的,如此处和此处所述(外部)

Having RC18 would mean that it refers to the 18th column from the cell you are and, when you check on a given cell in that column, the formula is "translated" to cell in 27th row for that range (the column 18). If any, please show a screen capture to keep on checking.

拥有RC18意味着它指的是您所在单元格中的第18列,当您检查该列中的给定单元格时,该公式将“转换”为该范围的第27行中的单元格(第18列)。如果有,请显示屏幕截图以继续检查。


推荐阅读
author-avatar
手机用户2602935405
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有