我有一个记录列表,我想将其分成不同的文件 在一个标准上,如果任何记录包含 5 * ,则将其作为列表附加到文件中(如果可能,则附加到.csv) 结果“仅”(例如 502 和 514 )。假设已经为此目的创建了文件。
我正在使用VBA Excel。
以下是一些记录的示例:
Description: French Examination no: ****
Exam Result: 487
Description: French examination no: ****
Exam Result: 377
Description: French examination no: ****
Exam Result: 502
Description: French examination no: ****
Exam Result: 514
我知道会使用拆分功能,但我不熟悉它。
非常感谢任何正确方向的帮助。
答案 0 :(得分:0)
您可能需要使用以下代码段:
astrRec = split( strRecord )
for each varItem in astrRec
if varItem like "5*" then
'append to first file
endif
next