APP下载

计算机在财会工作中的应用

2012-04-29夏丽萍

中国管理信息化 2012年20期
关键词:备用金

夏丽萍

[摘要] 备用金管理是会计日常业务之一,本文针对备用金管理中存在的问题,通过运用VBA程序实现Excel表格中的一些功能,使得备用金冲账及结算业务变得简单清晰,节省了会计人员的时间和精力,同时也为借款人理清了思路。

[关键词] 备用金;Excel;VBA

doi : 10 . 3969 / j . issn . 1673 - 0194 . 2012 . 20. 004

[中图分类号]F232[文献标识码]A[文章编号]1673 - 0194(2012)20- 0007- 03

在日常会计报账中,备用金冲借及余额查询是每个单位不可避免而且很频繁的业务,随着经济业务内容及进展不同,借款及冲账次数逐渐增多,时间稍长,借款人往往都搞不清自己哪些冲了,哪些没冲,报账会计面对众多的借款者查账、对账、报账、审核报账单等工作,往往疲于应对,尤其是到了年底决算的时候,会计业务增多,时间紧的情况下,这一问题显得更为突出,经过摸索发现在实际工作中通过Excel就可解决这一问题,以下简述解决的方法步骤。

1方法简述

用Excel表格做备用金结算单如表1。

按表中栏目只需填写冲账内容及分项目小写金额,摘要按箭头下拉菜单选择,合计栏就会自动出现大小写合计金额,鼠标点击借款金额处,就会出现如图的输入窗口,在此窗口中只要输入借款金额和实收现金两项,报销金额、应付金额、结欠金额就会自动计算出现。

通过以上简单操作,可以发现报账会计一方面可免去报销单据大小写不一致及摘要规范性审核,另一方面不需重复为报销人查备用金余额。

2实现表格内容的程序

以上表格中的内容通过Office中的VBA编写以下程序就可实现

Private blW As Boolean, blJ As Boolean

Function ConverUpper(ByVal C As Double) As String

Dim T As Double, G As Long, S As String, D As Integer

If C = 0 Then

ConverUpper = "合计(大写)"

Exit Function

End If

If C < 0.1 Then

ConverUpper = "合计(大写)" & UpperC(C *100) & "分"

Exit Function

End If

If C < 1 Then

blJ = False

ConverUpper = "合计(大写)" & JF(C * 100)

Exit Function

End If

G = Int(C / 10000)

blW = False

If G > 0 Then

T = C - G *10000

Else

T = C

End If

D = (T - Int(T))* 100

T = Int(T)

If G > 0 Then

S = Conver(G) & "万"

blW = True

End If

blJ = False

S = S & Conver(T) & "元"

ConverUpper = "合计(大写)" & S

If D = 0 Then

ConverUpper = ConverUpper & "整"

Else

ConverUpper = ConverUpper & JF(D)

End If

End Function

Private Sub Workbook_Open()

Range("C3") = "结算日期:" & Year(Now) & "年" & Month(Now) & "月" & Day(Now) & "日"

Range("E5").Value = "1、借款金额/元"

Range("E6").Value = "2、报销金额" & Format(Range("D12").Value, "#######0.00") & "元"

Range("E7").Value = "3、应付金额/元"

Range("E8").Value = "应付现金/元"

Range("E9").Value = "结欠金额/元"

End Sub

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

Dim G As Double, V As Double, strUpper As String

If Target.Column <> 4 Then Exit Sub

If Target.Row < 4 Then Exit Sub

If Target.Row > 11 Then Exit Sub

On Error GoTo EX:

G = Target.Value

V = Range("D12").Value

Range("E6").Value = "2、报销金额" & Format(CStr(V), "#######0.00") & "元"

Range("A12:C12").Value = ConverUpper(V)

Exit Sub

EX:

Range("A12:C12").Value = "合计(大写)"

End Sub

Function Conver(ByVal N As Double) As String

Dim W As Integer, Q As Integer, B As Integer, S As Integer, G As Integer

Dim sW As String, sQ As String, sB As String, sS As String, sG As String

W = Int(N / 10000)

If W > 0 Then

sW = UpperC(W) & "万"

N = N - W*10000

End If

If N = 0 Then GoTo EX

Q = Int(N / 1000)

If Q = 0 Then

If blW = True Then sQ = "零"

If W > 0 Then sQ = "零"

Else

sQ = UpperC(Q) & "仟"

N = N - Q* 1000

End If

If N = 0 Then GoTo EX

B = Int(N / 100)

If B = 0 Then

If Q > 0 Then sB = "零"

Else

sB = UpperC(B) & "佰"

N = N - B * 100

End If

If N = 0 Then GoTo EX

S = Int(N / 10)

If S = 0 Then

If B > 0 Then sS = "零"

Else

sS = UpperC(S) & "拾"

N = N - S*10

End If

EX: If N = 0 Then

blJ = True

End If

If N > 0 Then

sG = UpperC(N)

End If

Conver = sW & sQ & sB & sS & sG

End Function

Function UpperC(ByVal N As Integer) As String

Select Case N

Case 0

UpperC = "零"

Case 1

UpperC = "壹"

Case 2

UpperC = "贰"

Case 3

UpperC = "叁"

Case 4

UpperC = "肆"

Case 5

UpperC = "伍"

Case 6

UpperC = "陆"

Case 7

UpperC = "柒"

Case 8

UpperC = "捌"

Case 9

UpperC = "玖"

End Select

End Function

Function JF(ByVal F As Integer) As String

Dim sJ As String, sF As String

Dim Jiao As Integer, Fen As Integer

Jiao = Int(F / 10)

Fen = F - Jiao * 10

If Jiao = 0 Then

sJ = "零"

Else

If blJ = True Then

sJ = "零" & UpperC(Jiao) & "角"

Else

sJ = UpperC(Jiao) & "角"

End If

End If

If Fen = 0 Then

sJ = sJ & "整"

Else

sF = UpperC(Fen) & "分"

End If

JF = sJ & sF

End Function

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)

If Target.Column = 2 And (Target.Row > 4 And Target.Row < 12) Then

frmMain.Top = Target.Cells.Top + 100

frmMain.Left = Target.Cells.Left + 100

Set R = Target

frmMain.Show

End If

If Target.Column = 5 And Target.Row = 5 Then

frmCount.Top = Target.Cells.Top + 100

frmCount.Left = Target.Cells.Left + 100

Set R = Target

frmCount.Show

End If

If Target.Column = 1 And Target.Row = 2 Then

frmMain.Top = Target.Cells.Top + 100

frmMain.Left = Target.Cells.Left + 100

Set R = Target

frmMain.Caption = "报销单位"

frmMain.Show

End If

End Sub

3结论

以上方法在我单位财务工作中尝试应用,实践证明,取得了一定的成效,为财会人员节省了时间和精力,同时也使得借款人每次报销冲账时,都能清楚自己的备用金余额,免去理不清头绪,互相指责的烦恼,受到财会人员及借款人的欢迎。

猜你喜欢

备用金
非定额备用金制下差旅费报销业务会计处理分析
备用金的本质属性及其报表列报
企业备用金法律风险管理思考
村级集体备用金监管刍议