excell宏

2024-01-28 17:08
文章标签 excell

本文主要是介绍excell宏,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

Sub crea_detail()
'
' crea_detail Macro
' 宏由 微软用户 录制,时间: 2008-11-3
'

'

mxrow = 2
  For counter = 1 To 31
       For irow = 4 To 1000
            If Worksheets(counter).Cells(irow, 2).Value = "" Then
                Exit For
            End If
           
            If Worksheets(counter).Cells(irow, 1).Value <> "" Then
                Worksheets("当月总明细").Cells(mxrow, 1).Value = Worksheets(counter).Cells(irow, 1).Value
                Worksheets("当月总明细").Cells(mxrow, 2).Value = Worksheets(counter).Cells(irow, 2).Value
                Worksheets("当月总明细").Cells(mxrow, 3).Value = Worksheets(counter).Cells(irow, 3).Value
                Worksheets("当月总明细").Cells(mxrow, 4).Value = "10月" & Right("00" & Trim(Str(32 - counter)), 2) & "日"
                Worksheets("当月总明细").Cells(mxrow, 5).Value = Worksheets(counter).Cells(irow, 5).Value
                Worksheets("当月总明细").Cells(mxrow, 6).Value = Worksheets(counter).Cells(irow, 6).Value
                Worksheets("当月总明细").Cells(mxrow, 7).Value = Worksheets(counter).Cells(irow, 7).Value
                Worksheets("当月总明细").Cells(mxrow, 8).Value = "=lookup(G" & Trim(Str(mxrow)) & ",wd!$A2:$A187,wd!$D2:$D187)"
                mxrow = mxrow + 1
            End If
       Next irow
  Next counter
 
 
End Sub

这篇关于excell宏的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/654253

相关文章

hdu1826 EXCELL排序

EXCEL排序 Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 13394    Accepted Submission(s): 5254 Problem Description Excel可以对一组纪录按任意指定列

java excel 批注 图形_POI实现excell批注背景图片(仿html浮窗显示图片)

POI实现excell批注背景图片(仿html浮窗显示图片) 文章发表日期:2015-03-15 15:13:27 效果图: 首先从POI官网下载jar包 http://poi.apache.org/download.html 我下载的是最新的测试版: http://poi.apache.org/download.html#POI-3.12-beta1 然后解压zip包 代码: class="