Income Statement
Operating Profit is arrives after deducting:
from the gross profit
Profit Before Tax When other income is added and other expenses are deducted from the operating profit we get profit before Tax
Income generated other than manufacturing and seling operations (or)Operating activities termed as NON OPERATING INCOME
Capital Expenditure:
Revenue Expenditure:
Revenues
Deduct: Cost of goods sold and expenses
Income from continuing operations
Discontinued operations
Extraordinary gains and losses
Cumulative effect of change in accounting principle
Net income
Update daily transactions
Public WKB As Workbook, InputSH As Worksheet, SH As Worksheet
Sub CraeteNames()
On Error Resume Next
Set InputSH = ThisWorkbook.Sheets("InputData")
For N = 2 To InputSH.Cells(1, 12).End(xlDown).Row
'ThisWorkbook.Names(N).Delete
InputSH.Names(InputSH.Cells(N, 12).Value).Delete
Next
InputSH.Range(InputSH.Range("L2"), InputSH.Range("L2").End(xlDown)).Clear
ColumnNumber = 14
Do Until InputSH.Cells(1, ColumnNumber) = ""
InputSH.Cells(1, ColumnNumber).Activate
Lastrow = InputSH.Cells(1, ColumnNumber).End(xlDown).Row
InputSH.Range(Cells(2, ColumnNumber), Cells(Lastrow, ColumnNumber)).Select
InputSH.Names.Add Name:=InputSH.Cells(1, ColumnNumber).Value, RefersTo:=Selection
ColumnNumber = ColumnNumber + 1
Loop
InputSH.Range("L2").Listnames
InputSH.Range(InputSH.Range("M2"), InputSH.Range("M2").End(xlDown)).Clear
InputSH.Range("G2").Clear
With InputSH.Range("G2").Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, _
Operator:=xlBetween, Formula1:="=InputData!L2:L" & InputSH.Range("L2").End(xlDown).Row
.ErrorMessage = "Please select from dropdown"
.IgnoreBlank = True
.InCellDropdown = True
End With
InputSH.Range("A1").Select
End Sub
Sub Add_Transaction()
Set InputSH = ThisWorkbook.Sheets("InputData")
Lastrow = InputSH.Range("A" & Rows.Count).End(xlUp).Row + 1
InputSH.Range("A" & Lastrow).Value = InputSH.Range("F2").Value
InputSH.Range("B" & Lastrow).Value = InputSH.Range("H2").Value
InputSH.Range("C" & Lastrow).Value = InputSH.Range("I2").Value
InputSH.Range("F2:I2").ClearContents
InputSH.Sort.SortFields.Clear
InputSH.Sort.SortFields.Add Key:=InputSH.Range("A1:A" & Lastrow), _
SortOn:=xlSortOnValues, _
Order:=xlDescending
With InputSH.Sort
.SetRange InputSH.Range("A1:C" & Lastrow)
.Header = xlYes
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
Create Consolidation of Income Statement
Public WKB As Workbook, InputSH As Worksheet, SH As Worksheet
Sub Create_Income_Statement()
Set InputSH = ThisWorkbook.Sheets("InputData")
'To add the workbook
Set WKB = Workbooks.Add
Set SH = WKB.Sheets("Sheet1")
Dim Output As Integer
For r = 7 To InputSH.Range("I" & Rows.Count).End(xlUp).Row
SH.Cells(r - 3, 2).Activate
If InputSH.Range("I" & r).Font.ColorIndex <> 9 Then
rownumber = 2:
Do Until InputSH.Range("B" & rownumber).Value = ""
If InputSH.Cells(r, 9).Value = InputSH.Range("B" & rownumber).Value Then
Output = Output + InputSH.Range("C" & rownumber).Value
End If
rownumber = rownumber + 1
Loop
SH.Cells(r - 3, 3).Value = Output
Output = 0
End If
SH.Cells(r - 3, 2).Value = InputSH.Cells(r, 9).Value
SH.Range(Cells(r - 3, 2), Cells(r - 3, 3)).Select
'Create the Names based on selection
WKB.Names.Add Name:=NameAfterFormatting(SH.Cells(r - 3, 2).Value), RefersTo:=Selection
If InputSH.Cells(r, 9).Font.ColorIndex = 9 Then
HeaderFormatSelection
Else:
BodyFormatSelection
End If
Next
SH.Range("B2:C2").Select
Increase_ColumnWidth
FormatTopHeader
SH.Name = "Consolidated Income Statement"
SH.Range("B3").Select
SH.Range("B3").Value = "Particulars"
FormatSingleCell
SH.Range("C3").Select
SH.Range("C3").Value = "2018"
FormatSingleCell
RemoveGridLines
CalculateFormulas
End Sub
Function RemoveGridLines()
ActiveWindow.DisplayGridlines = False
End Function
Function HeaderFormatSelection()
With Selection
.Font.ColorIndex = 9
.Font.Bold = True
.Font.Name = "Century"
.Font.Size = 15
.Columns(2).HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
End With
End Function
Function BodyFormatSelection()
With Selection
.Font.Name = "Century"
.Font.Size = 15
.Columns(2).HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
End With
End Function
Function NameAfterFormatting(ResultString)
For i = 1 To Len(ResultString)
If UCase(Mid(ResultString, i, 1)) Like "[A-Z]" Then
NameAfterFormatting = NameAfterFormatting + Mid(ResultString, i, 1)
End If
Next
End Function
Function FormatTopHeader()
With Selection
.Merge
.Value = "Income Statement"
.Font.ColorIndex = 2
.Font.Bold = True
.Font.Name = "Century"
.Font.Size = 15
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.Interior.ColorIndex = 52
End With
End Function
Function FormatSingleCell()
With Selection
.Font.ColorIndex = 9
.Font.Bold = True
.Font.Name = "Century"
.Font.Size = 15
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
End With
End Function
Function Increase_ColumnWidth()
With Selection
.Columns(2).ColumnWidth = 15
.Columns(1).ColumnWidth = 45
End With
End Function
Function CalculateFormulas()
' SH.Range("NetSales").Columns(2).Select
' SH.Range("Sales").Columns(2).Select
' SH.Range("SalesReturns").Columns(2).Select
SH.Range("SalesReturns").Columns(2).Address(False, False))
SH.Range("NetSales").Columns(2).Value = "=" & SH.Range("Sales").Columns(2).Address(False, False) & "-" &
SH.Range("SalesReturns").Columns(2).Address(False, False)
FromAddress = SH.Range("Expenditure").Columns(2).Offset(1, 0).Address
ToAddress = SH.Range("TotalExpenditure").Columns(2).Offset(-1, 0).Address
SH.Range("TotalExpenditure").Columns(2).Value = "=sum(" & FromAddress & ":" & ToAddress & ")"
SH.Range("PBDIT").Columns(2).Value = "=" & SH.Range("NetSales").Columns(2).Address(False, False) & "-" &
SH.Range("TotalExpenditure").Columns(2).Address(False, False)
SH.Range("PBIT").Columns(2).Value = "=" & SH.Range("PBDIT").Columns(2).Address(False, False) & "-" &
SH.Range("Depreciation").Columns(2).Address(False, False)
SH.Range("PBT").Columns(2).Value = "=" & SH.Range("PBIT").Columns(2).Address(False, False) & "-" &
SH.Range("Interest").Columns(2).Address(False, False)
SH.Range("ReportedNetProfitPAT").Columns(2).Value = "=" & SH.Range("PBT").Columns(2).Address(False, False) & "-" &
SH.Range("Tax").Columns(2).Address(False, False)
SH.Range("AmountCFtoBalanceSheet").Columns(2).Value = "=" & SH.Range("ReportedNetProfitPAT").Columns(2).Address(False, False) & "-" & SH.Range("Dividend").Columns(2).Address(False, False)
End Function