简体   繁体   English

如何根据 VBA 或 Excel 公式中的单元格内容连接具有变化值的静态公式?

[英]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.

相关问题 Excel VBA / Formula用于基于其他2个单元格的值填充3个特定单元格 - Excel VBA/Formula for populating 3 specific cells based on the value of 2 other cells 如何使用VBA或公式对Excel范围内具有特定值且具有注释的单元格进行计数? - How do I count cells with in a range in excel with specific value that has a comment using vba or formula? Excel 中的 VBA - 更改列中的 VLOOKUP 公式以根据静态单元格值插入工作表名称 - VBA in Excel - Changing a VLOOKUP formula in a column to insert name of sheet based on static cell value Excel VBA:如何将公式插入单元格区域? - Excel VBA: How to Insert formula into an area of cells? 如何使用VBA在Excel单元格中实现公式 - How to Implement Formula into Excel cells using VBA 如何在Excel VBA中的不同单元格中循环公式? - How to loop a formula in different cells in excel vba? 在一定范围的单元格中,如何根据vba的条件输入公式? - Within a range of cells, how do I enter a formula based on condition with vba? 如何编写excel公式以根据单元格的内容返回范围中的值? - How can I write an excel formula to return a value from a range based on the contents of a cell? 在 Excel/VBA 中,如何根据单元格值将公式应用于范围? - In Excel/VBA, how to apply a formula to a range based on cell value? 如何使Excel公式跳过空单元格 - How do I make an excel formula skip empty cells
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM