Excel精英培训网

 找回密码
 注册
数据透视表40+个常用小技巧,让你一次学会!
楼主: 雪舞子

[资料] 【视频】【V201401窗体班】第十讲上课视频

  [复制链接]
发表于 2015-5-15 08:35 | 显示全部楼层
excel精英培训的微信平台,每天都会发送excel学习教程和资料。扫一扫明天就可以收到新教程
回复

使用道具 举报

发表于 2015-6-21 18:27 | 显示全部楼层
回复

使用道具 举报

发表于 2015-6-21 18:33 | 显示全部楼层
回复

使用道具 举报

发表于 2015-7-28 17:41 | 显示全部楼层
查阅内容,谢谢
回复

使用道具 举报

发表于 2015-7-30 20:46 | 显示全部楼层
回复

使用道具 举报

发表于 2015-9-6 18:06 | 显示全部楼层
谢谢
回复

使用道具 举报

发表于 2015-9-11 21:27 | 显示全部楼层
本帖隐藏的内容
Function shc()
  Application.Volatile True
  
  '编写一个自定义函数 shc 让其自动获得当前工作簿的工作表个数
  shc = Sheets.Count
  '在工作表里 输入 “=shc()”就得到当前工作簿的工作表个数
  '自定义函数一定要在模块中输入
End Function
Function Lianjie(mrg As Range, msr As String)
           '做自定义函数 lianjie连接(数组参数,连接符参数)
  Dim m As String
  With Application
    If mrg.Columns.Count > 1 Then
            '当选的数组为一行内的数组(列数>1)时
      m = Join(.Transpose(.Transpose(mrg)), msr)
            '用Join函数把数组连接成字符串
            '对于行的数组需要用Application.Transpose进行2次转换
    ElseIf mrg.Columns.Count = 1 Then
      m = Join(.Transpose(mrg), msr)
            '因为一维数组都是横向的,对于列的数组需要进行1次转换
    End If
    Lianjie = m
  End With
End Function

Function fenge(rng As Range, msr As String, x%)
'做自定义函数fenge(单元格参数,分隔符参数,第几个参数(数字))
  arr = Split(rng, msr)
        '用split函数把字符串(“要分隔的单元格”rng )拆分成数组成为arr数组
  fenge = arr(x - 1)
  '根据数值参数返回第n个数组(x-1 因为数组起始为0)
End Function

Function ticheng(a As Range)
   Select Case a
      Case Is > 20000
         n = a * 0.03
      Case Is > 10000
         n = a * 0.02
      Case Is >= 0
         n = a * 0.01
      Case Is < 0
         n = 0
      End Select
    ticheng = n
End Function
Private Sub Workbook_BeforePrint(cancel As Boolean)
  '打印前事件 “不允许打印”工作簿 放在 thisworkbook 的 workbook 里
   MsgBox "不能打印"
   cancel = True   'cancel = True 不能打印
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
     '工作表当前单元格事件 对工作表的指定列(前3列)不能输入
   If Target.Column < 4 Then Range("d1").Select
End Sub


回复

使用道具 举报

发表于 2015-9-17 13:34 | 显示全部楼层
感谢分享
回复

使用道具 举报

发表于 2015-9-22 17:27 | 显示全部楼层
谢谢学委,辛苦了
回复

使用道具 举报

发表于 2015-9-30 06:56 | 显示全部楼层
学习
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-24 03:26 , Processed in 0.508256 second(s), 6 queries , Gzip On, Yac On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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