求一个excel表格,关于消费记录的

2025-02-24 17:07:09
推荐回答(2个)
回答1:

文件做好了,用邮箱发给你了。
mariochencn@163.com
用到EXCEL 宏的功能。
具体不多说,上班要紧。
《消费记录与查询.xls》

Sub Macro1()
'
' Macro2 Macro
' 宏由 mariochencn 录制,时间: 2011-9-21
'

'
Range("D4").Select
ActiveCell.FormulaR1C1 = "6/1/2011"
Range("F4").Select
ActiveCell.FormulaR1C1 = "6/30/2011"
Range("G4").Select
ActiveCell.FormulaR1C1 = "=RC[-4]&RC[-3]"
Range("H4").Select
ActiveCell.FormulaR1C1 = "=RC[-3]&TEXT(RC[-2],""mm/dd"")"
Range("G4").Select
ActiveCell.FormulaR1C1 = "=RC[-4]&TEXT(RC[-3],""mm/dd"")"
Range("F8").Select
ActiveWindow.SmallScroll Down:=-27
Range("G4").Select
Sheets("明细表").Select
Range("A3:G13").Select
Sheets("查询表").Select
Range("G3:H4").Select
Sheets("明细表").Range("A3:G13").AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range("G3:H4"), CopyToRange:=Range("K3"), Unique:=False
End Sub
Sub 调用数据()
'
' Macro2 Macro
' 宏由 mariochencn 录制,时间: 2011-9-21
'

'
Range("K4:Q65536").ClearContents
Range("G4").Select
Sheets("明细表").Range("A3:G65536").AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range("G3:H4"), CopyToRange:=Range("K3:Q3"), Unique:=False
End Sub

回答2:

能不能把你做好的EXCEL表格给我一份