📌 📄 内容摘要:
如果初遇太过惊艳 (@user474) 在 excel自动化问题求助 中发帖
[image]
如图,C列填写的内容为 B列的黑体字,去掉年份 还要提取第几条,这种逻辑怎么自动化,求助大佬,用GPT生成了个VBA没啥反应
Sub FillContent()
Dim ws As Worksheet
Dim lastRow As Long
Dim i As Long
Dim leftContent As String
Dim filledContent As String
Dim ruleNumber As String
' 设置工作表
Set ws = ThisWorkbook.Sheets(1) ' 根据你的工作表调整索引或名字
' 获取最后一行的行号
lastRow = ws.Cells(ws.Rows.Count, 2).End(xlUp).Row
...
────────── 链接信息 ────────── 🔗 论坛链接: linux.do 📎 访问地址: https://linux.do/t/topic/235006/1 ─────────────────────────────
📢 来源:LINUX DO