Excel精英培训网

 找回密码
 注册
数据透视表40+个常用小技巧,让你一次学会!
查看: 2009|回复: 1

[已解决]求助:剪切E列的内容分别粘 ...

[复制链接]
发表于 2016-9-17 17:23 | 显示全部楼层 |阅读模式
求助:剪切E列的内容分别粘贴到D列F列。谢谢!.rar (19.65 KB, 下载次数: 9)
发表于 2016-9-18 10:59 | 显示全部楼层    本楼为最佳答案   
  1. Sub YuBa()
  2.     Dim rng As Range, s$, m%, n%, i%
  3.     m = Sheet1.[e65536].End(3).Row
  4.     For i = m To 1 Step -1
  5.         Set rng = Cells(i, "e")
  6.         If InStr(rng.Value, "*") Then
  7.             rng.Copy rng.Offset(1, 1)
  8.             Rows(rng.Row).Delete
  9.             ElseIf InStr(rng.Value, "解释:") Then
  10.             rng.Copy rng.Offset(1, -1)
  11.             Rows(rng.Row).Delete
  12.         End If
  13.     Next
  14. End Sub
复制代码

评分

参与人数 1 +3 收起 理由
水木 + 3

查看全部评分

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|Excel精英培训 ( 豫ICP备11015029号 )

GMT+8, 2024-6-6 13:02 , Processed in 0.218179 second(s), 13 queries , Gzip On, Yac On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表