小编shr*_*dij的帖子

VBA 提取字符串中的所有字段名

我有一个这样的字符串:

"'where CAST(a.DT_NPE_SORTIE as integer ) < cast (add_months (cast (a.dt_nep_restructuration as date format 'YYYYMMDD'), 12) as integer) and a.DT_NPE_SORTIE is not null and a.DT_NPE_SORTIE <> '99991231' and a.dt_npe_restructuration is not null and a.dt_npe_restructuration <> '99991231'"

我需要提取所有"a.FIELDNAME"喜欢a.dt_nep_restructurationa.DT_NPE_SORTIE从以前的屏幕。

我需要在 VBA 中为工作中的项目执行此操作。

到目前为止,我使用If&InStr来检查字符串中是否存在值列表​​。但是对我来说提取所有 a.FIELDNAME 然后检查它们是否与数组中的 fieldname 匹配会更容易。

此致,

约夫策尔

excel vba

3
推荐指数
1
解决办法
63
查看次数

how to get subscript into formulas text string

in excel I need to get this to be a subscript in the output.

Basically I want all the numbers in the output to be subscripted

I have tried this code, and it is part of a large IF "loop"


B2=2

=(B2="","","C"&B2) = C2
Run Code Online (Sandbox Code Playgroud)

where I desire an output like this C_2 (any help to get an actual C subscript her in the question box and not C_2, when making the question, would also be helpful)

the formatting did not …

excel excel-formula

1
推荐指数
1
解决办法
202
查看次数

标签 统计

excel ×2

excel-formula ×1

vba ×1