Hi there,
I haven't studied your code in detail, so I don't know what you're doing with the contents of the "v" array, but the highlighted lines are overwriting the output of the code that you posted:
'''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''
' printing values in H column
Worksheets("Output").Activate
lastRow = Range("A" & Rows.Count).End(xlUp).Row
For i = 2 To lastRow
If Range("E" & i).Value = "" Or Range("F" & i).Value = "" Then
Range("H" & i).Value = ""
Else
Range("H" & i).Value = Range("F" & i).Value - Range("E" & i).Value
End If
Next i
'''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''
With Worksheets("Output")
.Cells(1, 1).CurrentRegion.Offset(1).Clear
.Cells(2, 1).Resize(ndx, UBound(v, 2)).Value = v
With .UsedRange
.Columns("A:B").NumberFormat = "@"
.Columns("C").NumberFormat = "#,##0"
.Columns("D").NumberFormat = "d/m/yyyy"
.Columns("E:H").NumberFormat = "$* #,##0.00"
End With
End With
End Sub
Thanks for posting the entire workbook instead of just the snippet of code, otherwise I wouldn't have been able to make this suggestion. I wish more posters would follow your good example! 
Hope this helps.
Regards,
Greg M
Bookmarks