提取表数据

Sub m_loss() Dim d_m, r, r_loss As Integer Dim date_new As Date r = Range("a65536").End(xlUp).Row r_loss = Sheets("LOSS").Range("a65536").End(xlUp).Row zyname = InputBox("請輸入廠名") d_m = Int(InputBox("請輸入月份date_m")) '注意數據轉換  2003,2007 好像版本不一樣 Sheets("LOSS").Cells(r_loss + 4, 1) = zyn...
2018-10-05 16:43 | 阅读 203 次 | 评论 0 条

vba formula 的带变量引用使用 多表汇总

Sub ai_insurance() cr = Range("c65536").End(xlUp).Row Set crng = Range(Cells(1, 3), Cells(cr, 3)) Dim arr(13) As Integer For Each c In crng Select Case Left(c, 2) Case "1月" arr(1) = c.Row Case "2月" arr(2) = c....
2018-09-30 09:50 | 阅读 327 次 | 评论 3 条

vba_date

Sub mydate_deal() Dim r_max, r_min, r As Integer r_max = Range("b65500").End(xlUp).Row r_min = Range("k65500").End(xlUp).Row y = Year(Now()) dm = Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31) If ((y Mod 400 = 0) Or (y Mod 4 = 0 And y Mod 100 <> 0)) Then dm(1) = 29 ...
2018-09-06 15:28 | 阅读 221 次 | 评论 0 条

excel 100内加减法自动出题及评分

Sub Macro5() ' ' Macro5 Macro ' qunxingw  2016/5/21 全部录制。 ' Sheets("Sheet3").Select Range("E1").Select Application.CutCopyMode = False Selection.AutoFill Destination:=Range("E1:E50") Range("E1:E50").Select Range("A1:C50").Select Selection.Copy Shee...
2016-05-30 21:39 | 阅读 13232 次 | 评论 0 条

vba 日历

Sub abc() Dim dm As Variant Dim m, w, d, r As Integer y = InputBox("put_year") m = InputBox("put_month") d = DateSerial(y, m, 1) w = Weekday(d) r = 3 Range("3:10").ClearContents Cells(1, 1) = y &amp; "-year," &amp; m &amp; "-month" dm = Array(31, 28, 31, 30, 31, 30, 31, 31, 30, ...
2016-02-24 20:03 | 阅读 11294 次 | 评论 0 条

多表汇总目录指引

Set rng = Sheets("洗沫汇总表").Range("a1:e50") rng.Select Selection.Clear Sheets("洗沫汇总表").Cells(1, 1) = "部门" Sheets("洗沫汇总表").Cells(1, 2) = "金质" Sheets("洗沫汇总表").Cells(1, 3) = "金重" Sheets("洗沫汇总表").Cells(1, 4) = "报表编号" Sheets("洗沫汇总表").Cells(1, 5) = "表名" ii...
2015-12-23 20:33 | 阅读 1070 次 | 评论 0 条

vba处理excel的确高效

Private Sub formjpsto過度表復制() ' ' Macro2 Macro 111,22222,3333 ' qunxingw 在 2015/11/21 錄製的巨集 ' ' Application.Run "'複製 -實驗.xls'!copyjpstemp" Application.Run "'複製 -實驗.xls'!deletemprow" Application.Run "'複製 -實驗.xls'!COPY過渡表" End Sub Private Sub 總表處理() Dim rs As Long Dim rm As Long rs = range("A6...
2015-11-24 22:49 | 阅读 1274 次 | 评论 0 条
浏览163615次
最新评论