excel - 基于表 MakroExcelVBA 的 MultiFInd 替换
问题描述
我在下面的代码中遇到问题当我有大约 80 多个短语来替换宏时,会跳过一些随机短语。当我隔离这个短语时,宏很好。
Sub MultiFindNReplace()
Dim Rng As Range
Dim InputRng As Range, ReplaceRng As Range
xTitleId = "KutoolsforExcel"
Set InputRng = Application.Selection
Set InputRng = Application.InputBox("Original Range ", xTitleId, InputRng.Address, Type:=8)
Set ReplaceRng = Application.InputBox("Replace Range :", xTitleId, Type:=8)
Application.ScreenUpdating = False
For Each Rng In ReplaceRng.Columns(1).Cells
InputRng.Replace what:=Rng.Value, replacement:=Rng.Offset(0, 1).Value
Next
Application.ScreenUpdating = True
End Sub
解决方案
推荐阅读
- google-apps-script - 有没有脚本来做查询和导入范围结合的功能
- c# - 两个线程访问全局变量时的意外结果
- python - BeautifulSoap 为具有特定类的 div 中的所有 img 获取多个元素
- android - Android后退按钮退出应用程序react-native
- javascript - 将工具提示添加到 Dynamics 365 中子网格中的列名称
- java - Spring Boot 如何选择外部化的弹簧属性文件
- curl - 使用 CURL 重定向后发送表单数据
- python - Python:将函数作为参数传递以初始化对象的方法。Pythonic 与否?
- android - Xamarin Android 使背景透明
- antlr4 - antlr4 等于/赋值歧义