云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > Excel鑷紪瀹忓ぇ鍏?Word鐗? - 鐧惧害鏂囧簱

Excel鑷紪瀹忓ぇ鍏?Word鐗? - 鐧惧害鏂囧簱

  • 62 次阅读
  • 3 次下载
  • 2025/6/3 9:46:14

Range(\ Selection.Copy Sht2.Range(\ Application.CutCopyMode = False Sht1.Activate

pp = Sht1.Range(\ '将行数赋给变量pp Range(Cells(pp, 7), Cells(pp + aa - 1, 7)).Select

Selection.Copy Sht2.Range(\ '时间复制到表2 Sht2.Activate Cells(2, 3).Select

Selection.Formula = \ '时间值公式 If aa > 1 Then

Selection.AutoFill Destination:=Range(\ '公式往下复制

Range(\

Selection.Sort Key1:=Range(\ OrderCustom:=2, MatchCase:=False, Orientation:=xlTopToBottom, SortMethod _ :=xlPinYin Else End If

pp1 = Range(\ Sheets(2).Select For xx = 1 To 7

Cells(x, xx) = Sht1.Cells(pp1, xx) Next xx nn = aa

Sht1.Activate

Range(\ '清除辅助列数据 Sht2.Activate

Range(Cells(1, 1), Cells(aa + 1, 3)).ClearContents 200: Next x Sht1.Activate

Range(\

Selection.CurrentRegion.ClearContents '清除辅助列数据 Sheets(2).Activate

Range(\ ?排序

Selection.Sort Key1:=Range(\

OrderCustom:=2, MatchCase:=False, Orientation:=xlTopToBottom, SortMethod _ :=xlPinYin

加边框 '转加边框宏

Range(\

Application.ScreenUpdating = True

End Sub

Sub BcfzGS() '不重复值公式

Range(\ '辅助列公式求有几个不重复值 Selection.FormulaArray = \

Selection.AutoFill Destination:=rng1, Type:=xlFillDefault '公式往下复制 b = Application.WorksheetFunction.CountIf(rng1, \End Sub

Sub FuzulieGS()

'某个不重复值的个数和所在行数的数组公式 Sht1.Select

Set a = Range(\

aa = Application.WorksheetFunction.CountIf(minc, a) '计算某个不重复值的个数 Range(\ nn = aa

Range(\

Range(\ '某个不重复值所在行数的数组公式 Selection.FormulaArray = \$1,row(minc),\ If aa > 1 Then

Selection.AutoFill Destination:=Range(\ Else End If End Sub

Sub 加边框()

BorderVars(1) = xlEdgeLeft BorderVars(2) = xlEdgeTop BorderVars(3) = xlEdgeBottom BorderVars(4) = xlEdgeRight BorderVars(5) = xlInsideVertical BorderVars(6) = xlInsideHorizontal Range(\

Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone

For x = 1 To 6

With Selection.Borders(BorderVars(x)) .LineStyle = xlContinuous .Weight = xlThin

.ColorIndex = xlAutomatic End With Next End Sub

Sub zhytjl0215()

'最后一条记录0215.xls '蓝桥玄霜, '2007-2-15

'根据czzqbμ的数组公式修改 '在表1的H列加了时间转换公式

Dim b As Integer, x As Integer, y As Integer Dim minc As Range

Dim rng1 As Range, a As Range Dim Myrow1 As Integer

Dim Sht1 As Worksheet, Sht2 As Worksheet Dim BorderVars(6) As Variant

On Error Resume Next

Application.ScreenUpdating = False

Set Sht1 = Sheets(1): Set Sht2 = Sheets(2) Sht1.Activate ?定义动态区域名称

ActiveWorkbook.Names.Add Name:=\

\ ActiveWorkbook.Names.Add Name:=\

\

Range(\

Selection.CurrentRegion.ClearContents Sheet2.Activate Range(\

Selection.CurrentRegion.ClearContents Sht1.Range(\ Sht1.Activate

Range(\

Myrow1 = Selection.CurrentRegion.Rows.Count Set minc = Range(\

Set rng1 = Range(\

Range(\ '?'辅助列公式求不重复值 Selection.FormulaArray = \ Selection.AutoFill Destination:=rng1, Type:=xlFillDefault

?不重复值的个数

b = Application.WorksheetFunction.CountIf(rng1, \ Range(\ Selection.Copy

Selection.PasteSpecial Paste:=xlValues

Range(Cells(2, 14), Cells(1 + b, 14)).Copy Sht2.Cells(2, 1) Sht2.Activate Sht2.[b2].Select

Selection.FormulaR1C1 = \ Sht2.[c2].Select

Selection.Formula = \ Sht2.[d2].Select

Selection.Formula = \ Sht2.[e2].Select

Selection.Formula = \ Sht2.[f2].Select

Selection.Formula = \ Sht2.[g2].Select

Selection.FormulaArray = \ ?求时间最后的数组公式,by:czzqb

Range(\

Selection.AutoFill Destination:=Range(\

Sheets(2).Activate

Range(\ ?排序

Selection.Sort Key1:=Range(\

OrderCustom:=2, MatchCase:=False, Orientation:=xlTopToBottom, SortMethod _ :=xlPinYin

Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone ?加边框

BorderVars(1) = xlEdgeLeft BorderVars(2) = xlEdgeTop BorderVars(3) = xlEdgeBottom BorderVars(4) = xlEdgeRight BorderVars(5) = xlInsideVertical BorderVars(6) = xlInsideHorizontal

  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

Range(\ Selection.Copy Sht2.Range(\ Application.CutCopyMode = False Sht1.Activate pp = Sht1.Range(\ '将行数赋给变量pp Range(Cells(pp, 7), Cells(pp + aa - 1, 7)).Select Selection.Copy Sht2.Range(\ '时间复制到表2 Sht2.Activate Cells(2, 3).Select Selection.Form

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com