欢迎来到冰点文库! | 帮助中心 分享价值,成长自我!
冰点文库
全部分类
  • 临时分类>
  • IT计算机>
  • 经管营销>
  • 医药卫生>
  • 自然科学>
  • 农林牧渔>
  • 人文社科>
  • 工程科技>
  • PPT模板>
  • 求职职场>
  • 解决方案>
  • 总结汇报>
  • ImageVerifierCode 换一换
    首页 冰点文库 > 资源分类 > DOCX文档下载
    分享到微信 分享到微博 分享到QQ空间

    Excel中利用宏编辑的VBA提取有用数据并对数据自动处理和制图.docx

    • 资源ID:5295379       资源大小:15.31KB        全文页数:9页
    • 资源格式: DOCX        下载积分:3金币
    快捷下载 游客一键下载
    账号登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录 QQ登录
    二维码
    微信扫一扫登录
    下载资源需要3金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP,免费下载
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    Excel中利用宏编辑的VBA提取有用数据并对数据自动处理和制图.docx

    1、Excel中利用宏编辑的VBA提取有用数据并对数据自动处理和制图Excel中利用宏编辑的VBA提取有用数据并对数据自动处理和制图Sub 整体数据处理() 工作表“HistroryData”提取8:30数据 Sheets(HistroryData).Select Range(E2).Select ActiveCell.FormulaR1C1 = =RC-1 Selection.AutoFill Destination:=Range(E2:E2100 ), Type:=xlFillDefault Range(E2:E2100 ).Select Selection.NumberFormatLocal

    2、 = 0.00_);红色(0.00) Range(F2).Select ActiveCell.FormulaR1C1 = =INT(RC-1) Selection.AutoFill Destination:=Range(F2:F2100), Type:=xlFillDefault Range(G2).Select ActiveCell.FormulaR1C1 = =INT(RC-2-RC-1)*100) Selection.AutoFill Destination:=Range(G2:G2100), Type:=xlFillDefault Dim i As Integer For i = Ra

    3、nge(g65536).End(xlUp).Row To 2 Step -1 If Range(g & i).Value 35 Then Rows(i).Delete shift:=xlUp End If Next Columns(E:G).Select Selection.ClearContents 工作表“HistroryData (2)”提取12:30数据 Sheets(HistroryData (2).Select Range(E2).Select ActiveCell.FormulaR1C1 = =RC-1 Selection.AutoFill Destination:=Range(

    4、E2:E2100), Type:=xlFillDefault Range(E2:E2100).Select Selection.NumberFormatLocal = 0.00_);红色(0.00) Range(F2).Select ActiveCell.FormulaR1C1 = =INT(RC-1) Selection.AutoFill Destination:=Range(F2:F2100), Type:=xlFillDefault Range(G2).Select ActiveCell.FormulaR1C1 = =INT(RC-2-RC-1)*100) Selection.AutoF

    5、ill Destination:=Range(G2:G2100), Type:=xlFillDefault Dim j As Integer For j = Range(g65536).End(xlUp).Row To 2 Step -1 If Range(g & j).Value 52 Then Rows(j).Delete shift:=xlUp End If Next Columns(E:G).Select Selection.ClearContents 工作表“HistroryData (3)”提取4:30数据 1 Sheets(HistroryData (3).Select Rang

    6、e(E2).Select ActiveCell.FormulaR1C1 = =RC-1 Selection.AutoFill Destination:=Range(E2:E2100), Type:=xlFillDefault Range(E2:E2100).Select Selection.NumberFormatLocal = 0.00_);红色(0.00) Range(F2).Select ActiveCell.FormulaR1C1 = =INT(RC-1) Selection.AutoFill Destination:=Range(F2:F2100), Type:=xlFillDefa

    7、ult Range(G2).Select ActiveCell.FormulaR1C1 = =INT(RC-2-RC-1)*100) Selection.AutoFill Destination:=Range(G2:G2100), Type:=xlFillDefault Dim k As Integer For k = Range(g65536).End(xlUp).Row To 2 Step -1 If Range(g & k).Value 68 Then Rows(k).Delete shift:=xlUp End If Next Columns(E:G).Select Selection

    8、.ClearContents 数据汇总到工作表“数据处理”上 Sheets(HistroryData).Select Range(C2:C34).Select Selection.Copy Sheets(数据处理).Select Range(C4).Select ActiveSheet.Paste Sheets(HistroryData (2).Select Range(c2:c34).Select Selection.Copy Sheets(数据处理).Select Range(D4).Select ActiveSheet.Paste Sheets(HistroryData (3).Sele

    9、ct Range(c2:c34).Select Selection.Copy Sheets(数据处理).Select Range(E4).Select ActiveSheet.Paste Range(C2).Select ActiveCell.FormulaR1C1 = 液位状态 Range(C2:E2).Select Selection.Merge Range(C2:E2).Select 2 With Selection.Font .Size = 14 End With Range(C3).Select ActiveCell.FormulaR1C1 = 8:30AM Range(D3).Se

    10、lect ActiveCell.FormulaR1C1 = 12:30AM Range(E3).Select ActiveCell.FormulaR1C1 = 4:30PM Range(B3).Select ActiveCell.FormulaR1C1 = 距今天天数 Range(B4).Select ActiveCell.FormulaR1C1 = 1 Range(B5).Select ActiveCell.FormulaR1C1 = 2 Range(B4:B5).Select Selection.AutoFill Destination:=Range(B4:B150), Type:=xlF

    11、illDefault 调整表格边框 Range(B2:E150).Select With Selection .HorizontalAlignment = xlCenter .VerticalAlignment = xlBottom .WrapText = False .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext End With Selection.Borders(xlDiagonalDown).LineStyle = xlNone Sel

    12、ection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.Borders(xlEd

    13、geBottom) .LineStyle = xlContinuous .Weight = xlThin 3 .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.Borders(xlInsideVertical) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex

    14、= xlAutomatic End With With Selection.Borders(xlInsideHorizontal) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With Range(B2:B3).Select Selection.Merge Columns(B:B).ColumnWidth = 15.71 Range(B2:B3).Select With Selection.Font .Size = 14 End With 用量计算 Range(F2).Select Activ

    15、eCell.FormulaR1C1 = 用量(mm) Range(F2:H2).Select Selection.Merge With Selection.Font .Size = 14 End With Range(F3).Select ActiveCell.FormulaR1C1 = 8:30AM Range(G3).Select ActiveCell.FormulaR1C1 = 12:30AM Range(H3).Select ActiveCell.FormulaR1C1 = 4:30PM 8:30AM用量计算 Range(F4).Select ActiveCell.FormulaR1C

    16、1 = =R1C-3-RC-3 Range(F5).Select ActiveCell.FormulaR1C1 = =R1C-3-RC-3 Range(F4:F5).Select 4 Selection.AutoFill Destination:=Range(F4:F150), Type:=xlFillDefault 12:30AM用量计算 Range(G4).Select ActiveCell.FormulaR1C1 = =R1C-3-RC-3 Range(G5).Select ActiveCell.FormulaR1C1 = =R1C-3-RC-3 Range(G4:G5).Select

    17、Selection.AutoFill Destination:=Range(G4:G150), Type:=xlFillDefault 4:30PM用量计算 Range(H4).Select ActiveCell.FormulaR1C1 = =R1C-3-RC-3 Range(H5).Select ActiveCell.FormulaR1C1 = =R1C-3-RC-3 Range(H4:H5).Select Selection.AutoFill Destination:=Range(H4:H150), Type:=xlFillDefault 画日用量图 Range(F3:H34).Select Charts.Add ActiveChart.ChartType = xlLineMarkers ActiveChart.SetSourceData Source:=Sheets(数据处理).Range(F3:H20) ActiveChart.Location Where:=xlLocationAsObject, Name:=数据处理 ActiveChart.HasTitle = True ActiveChart.ChartTitle.Text = XX End Sub 5


    注意事项

    本文(Excel中利用宏编辑的VBA提取有用数据并对数据自动处理和制图.docx)为本站会员主动上传,冰点文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰点文库(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

    copyright@ 2008-2023 冰点文库 网站版权所有

    经营许可证编号:鄂ICP备19020893号-2


    收起
    展开