[英]How do I CONCAT a static formula with a changing value based on a cells contents in VBA or an Excel formula?
My formula is as follows:我的公式如下:
=(CONCAT("=RSLINX|PLC1!",B3)
B3 = VarName1 B3 = 变量名 1
The goal is to use the RSLINX function with the contents of a changing cell (B3)目标是将 RSLINX 函数与不断变化的单元格 (B3) 的内容一起使用
I have also tried putting "=RSLINX|PLC1!"我也试过把“=RSLINX|PLC1!” in it's own cell to reference as a string, as well as the following formula:在它自己的单元格中作为字符串引用,以及以下公式:
=INDIRECT(CONCAT("=RSLINX|PLC1",B3))
The objective is that B3 can change to a different cell (B4, B5, etc.) so that I can evaluate many different tags quickly, as the only way I've had the RSLINX function work is by manually typing in a correct tag name.目标是 B3 可以更改为不同的单元格(B4、B5 等),以便我可以快速评估许多不同的标签,因为我使用 RSLINX 函数的唯一方法是手动输入正确的标签名称.
Resolved.解决。 I had to use the original formula:我不得不使用原始公式:
=(CONCAT("=RSLINX|PLC1!",B3)
For all desired tags, then copy it and use "Paste Value" and Search & Replace all "RSLINX" with "=RSLINX" in the new columns.对于所有需要的标签,然后复制它并在新列中使用“粘贴值”和“搜索并用“=RSLINX”替换所有“RSLINX”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.