Public Sub CopyModelHideBlankRows()
AppSettings
Dim StartTime As Variant
Dim UsedTime As Variant
StartTime = VBA.Timer Dim RngAddress As String, Rng As Range, Sht As Worksheet, URows As Range
Dim RngRow As Long, RngCol As Long, FirstRow As Long
Const MaxRow As Long = 57
Set Sht = Application.ActiveSheet
With Sht On Error Resume Next
Set Rng = Application.InputBox("请选择2号所在的区域", "QQ 84857038", , , , , , 8)
On Error GoTo 0 If Rng Is Nothing Then Exit Sub RngRow = Rng.Rows.Count
RngCol = Rng.Columns.Count
FirstRow = Rng.Cells(1, 1).Row If RngRow < MaxRow Then
Rng.Cells(1, 1).Resize(MaxRow - RngRow, 1).EntireRow.Insert
End If Set Rng = .Cells(FirstRow, "A").Resize(MaxRow, RngCol)
Debug.Print Rng.Address For i = 3 To 31
EndRow = .Cells.Find("*", .Cells(1, 1), xlValues, xlWhole, xlByRows, xlPrevious).Row + 1
Rng.Copy .Cells(EndRow, 1)
Next i EndRow = .Cells.Find("*", .Cells(1, 1), xlValues, xlWhole, xlByRows, xlPrevious).Row
For i = 1 To EndRow
If Application.WorksheetFunction.CountA(.Rows(i)) = 0 Then
If URows Is Nothing Then
Set URows = .Rows(i)
Else
Set URows = Union(URows, .Rows(i))
End If
End If
Next i If Not URows Is Nothing Then
URows.EntireRow.Hidden = True
End If End With
UsedTime = VBA.Timer - StartTime
' Debug.Print "UsedTime :" & Format(UsedTime, "#0.0000 Seconds")
MsgBox "UsedTime :" & Format(UsedTime, "#0.0000 Seconds") AppSettings False
End Sub
Public Sub AppSettings(Optional IsStart As Boolean = True)
Application.ScreenUpdating = IIf(IsStart, False, True)
Application.DisplayAlerts = IIf(IsStart, False, True)
Application.Calculation = IIf(IsStart, xlCalculationManual, xlCalculationAutomatic)
Application.StatusBar = IIf(IsStart, ">>>>>>>>Macro Is Running>>>>>>>>", False)
End Sub

  

20170821xlVBA跨表公式套用的更多相关文章

  1. Excel-VLOOKUP函数跨表匹配查找①

    问题场景 对表中的员工进行测评总结,从所有员工考核明细表中匹配这些参与测评的员工的得分和相关信息: 场景一 从所有员工明细表中匹配需要参与测评的员工相关信息. 建了两个sheet页,考核员工表和全员考 ...

  2. django(3) 一对多跨表查询、ajax、多对多

    1.一对多跨表查询获取数据的三种形式:对象.字典.元组 例:有host与business两张表,host与business的id字段关联,business在host表中的对象名是b,  通过查询hos ...

  3. Mysql跨表更新 多表update sql语句总结

    Mysql跨表更新一直是大家所关心的话题,本文介绍mysql多表 update在实践中几种不同的写法 假定我们有两张表,一张表为Product表存放产品信息,其中有产品价格列Price:另外一张表是P ...

  4. mysql 去重,跨表更新,跨表删除

    一.去重 1.查询出重复的记录 CREATE TABLE push_log_full_2013_10_30_tmp SELECT * FROM `push_log_full` WHERE time B ...

  5. mysql支持跨表delete删除多表记录

    前几天写了Mysql跨表更新的一篇总结,今天我们看下跨表删除. 在Mysql4.0之后,mysql开始支持跨表delete. Mysql可以在一个sql语句中同时删除多表记录,也可以根据多个表之间的关 ...

  6. c# 数据库编程(利用DataSet 和 DataAdaper对象操作数据库--跨表操作)

    上篇文章我们介绍了如何利用DataSet 和 DataAdaper对象来对单张表进行操作. 本文我们将介绍如何进行跨表操作. 我们通过具体例子方式进行演示,例子涉及到三张表. 1)student表(学 ...

  7. excel vba 实现跨表单(sheet) 搜索 - 显示搜索行记录搜索历史

    前两天,一个朋友问我,有没有办法在excel里实现一个表单里是原始数据,在另一个表单里显示搜索到的行,搜索关键词可用~分隔开,并把搜索历史记录下来? 我想了想,用vba实现肯定可以啊,但是我又在想,有 ...

  8. 本表触发更新modifytime,跨表更新modifytime 触发器

    一.每行有改动,则触发更新modifytime SQL> create table test(id int, name varchar(10), crdate date, udate date) ...

  9. django models的点查询/跨表查询/双下划线查询

    django models 在日常的编程中,我们需要建立数据库模型 而往往会用到表与表之间的关系,这就比单表取数据要复杂一些 在多表之间发生关系的情形下,我们如何利用models提供的API的特性获得 ...

随机推荐

  1. ProgressDemo

    封装了下如下View滑动效果,类似网易的首页滑动效果. 详情见: https://github.com/VivienQin16/ProgressDemo

  2. 鼠标滑轮事件QWheelEvent

    一般鼠标滑轮事件会发出信号,参数是QWheelEvent,只需要新建槽函数,QWheelEvent作为参数. void myMouseWheelEvent(QWheelEvent* even) {)/ ...

  3. topcoder srm 685 div1

    problem1 link 依次枚举每个元素$x$,作为$S$中开始选择的第一个元素.对于当前$S$中任意两个元素$i,j$,若$T[i][j]$不在$S$中,则将其加入$S$,然后继续扩展:若所有的 ...

  4. Spring 学习——Spring IOC概念

    Spring IOC 接口及面向接口编程 接口 定义及理解:接口是一个类的抽象声明,用于由内部操作分离出外部沟通的方式,使其内部进行修改而不影响其外部连接沟通的一种交互方式.不对外公开逻辑处理,只是返 ...

  5. 论文阅读之: Hierarchical Object Detection with Deep Reinforcement Learning

    Hierarchical Object Detection with Deep Reinforcement Learning NIPS 2016 WorkShop  Paper : https://a ...

  6. 1、HA Cluster基础原理

    Linux Cluster  -->  linux集群类型分三种: LB:负载均衡,LoadBalance HA:双机集群系统,指高可用性集群,High Available HP:Hadoop ...

  7. 【NOIP 2015】Day2 T3 运输计划

    Problem Background 公元 \(2044\) 年,人类进入了宇宙纪元. Description 公元\(2044\) 年,人类进入了宇宙纪元. $L $国有 \(n\) 个星球,还有 ...

  8. 【Mysql】key 、primary key 、unique key 与index区别

    参考:https://blog.csdn.net/nanamasuda/article/details/52543177 总的来说,primary key .unique key 这些key建立的同时 ...

  9. codeforces gym 100947 J. Killing everything dp+二分

    J. Killing everything time limit per test 4 seconds memory limit per test 64 megabytes input standar ...

  10. DataGrip激活码

    引言: 网上有有很多datagirp的激活码,但是经过尝试很多都失效了,找了半天终于 找到了一个可用的激活码! 1. 激活码 适用版本: DataGrip2018.2.3,2018.1.1,其他版本没 ...