Excel精英培训网

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

VBA80第13集练习题上交专贴:单元格信息返回

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

使用道具 举报

发表于 2012-2-27 15:35 | 显示全部楼层
回复

使用道具 举报

发表于 2012-2-29 23:13 | 显示全部楼层
本帖最后由 1982zyh 于 2012-2-29 23:15 编辑
  1. [hide]Sub 第一题()

  2. Dim b As Integer

  3. Dim d As Integer

  4.     With Range("C4").CurrentRegion

  5.         b = .Rows.Count

  6.         d = .Columns.Count
  7.         
  8.         [b12] = .Range("a1").Offset(b - 1, d - 1).Address(0, 0)
  9.         
  10.     End With
  11.    
  12. End Sub

  13. Sub 第二题()

  14. Dim a As Integer
  15. Dim b As Integer
  16. Dim c As Integer
  17.    
  18. With Range("d3")
  19.     a = .Left
  20.     b = .Width
  21. End With
  22. c = a + b
  23.    
  24. With Range("F3").Comment
  25.     .Shape.Left = c
  26. End With


  27. End Sub[/hide]
复制代码

回复

使用道具 举报

发表于 2012-3-4 09:47 | 显示全部楼层
本帖最后由 rinyxa 于 2012-3-4 09:53 编辑

  1. 第一题Sub ar()
  2. x = Range("c4").CurrentRegion.Row
  3. y = Range("c4").CurrentRegion.Column
  4. y1 = Range("c4").CurrentRegion.Columns.Count
  5. x1 = Range("c4").CurrentRegion.Rows.Count
  6. Range("a1") = Cells(x + x1 - 1, y + y1 - 1).Address
  7. End Sub
  8. 第二题
  9. Sub x5()
  10. Range("a1") = [e3].Left
  11. Range("f3").Comment.Shape.Left = [e3].Left
  12.     End Sub
复制代码

回复

使用道具 举报

发表于 2012-3-11 09:10 | 显示全部楼层
有潜力,我学习来了
回复

使用道具 举报

发表于 2012-3-15 22:34 | 显示全部楼层
基础太差了,但仍要坚持。
回复

使用道具 举报

发表于 2012-3-15 23:00 | 显示全部楼层
Sub t()
    With Range("c4").CurrentRegion
    n = .Rows.Count
    m = .Columns.Count
    Range("a1") = .Address(0, 0)
    End With
回复

使用道具 举报

发表于 2012-3-17 10:49 | 显示全部楼层
认真学习天天向上
回复

使用道具 举报

发表于 2012-3-17 14:26 | 显示全部楼层
进来学习一下,谢谢版主分享
回复

使用道具 举报

发表于 2012-3-17 20:45 | 显示全部楼层
刚做完第一题

Sub 返回区域单位格地址()
Dim rg As Range, cn As Integer, rw As Integer, t As Integer, ct As Integer, cs As Integer, ts As Integer
With Range("c4").CurrentRegion
      t = .Row
      ts = .Column
     cn = .Rows.Count
     rw = .Columns.Count
End With
ct = t - Range("A1").Row
cs = ts - Range("A1").Column
[a1] = Cells(cn + ct, rw + cs).Address(0, 0)
End Sub
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-16 23:08 , Processed in 0.182119 second(s), 7 queries , Gzip On, Yac On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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