Dr / Cr Suffix for amounts in Tally Exported reports

1,470 views
Skip to first unread message

Mak @ gmail

unread,
Jul 22, 2014, 5:03:51 AM7/22/14
to nash...@googlegroups.com
Hi,

We all use Tally a lot and mostly we export the reports to excel for post processing. Tally exports the amounts with Dr / Cr suffix. This looks good but is annoying when we post process the report and try to add OR substract column values. 

I have come across a solution to replace the Cr amounts with a -ve sign as follows.

Open the tally report in excel.

Press Alt + F11 in excel to open the Visual basic Editor

 

Paste the following code in the editor.

 

Sub FixCrDrCells()

  Dim Cell As Range

  For Each Cell In Intersect(Range("A:A,Z:Z"), ActiveSheet.UsedRange)

    If Right(Cell.Text, 2) = "Cr" Then Cell.Value = -Cell.Value

  Next

  Intersect(Range("A:A,Z:Z"), ActiveSheet.UsedRange).NumberFormat = "0.00"

End Sub

 

 

Press F5 to run the code. Now all Cr values will become –ve.


* Note : A:A, Z:Z denote the range of cells to which formula needs to be applied. You can tweak it as required.


Best Regards

Makrand
9970187164


CA. Vidyasagar J. Joshi

unread,
Jul 26, 2014, 3:41:45 AM7/26/14
to nash...@googlegroups.com
Dear Makrand Sir,
Its a most required solution. We were facing the problem since long. Thanks a lot.

Thanks and Regards
CA. Vidyasagar J. Joshi
B.Com, FCA, IFRS (ICAI), DIRM (ICAI)
Nasik
M - 9422284520
Tel. (0253)2313696 (O), 2319175(R)


--
You received this message because you are subscribed to the Google Groups "NashiCAs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nashicas+u...@googlegroups.com.
To post to this group, send email to nash...@googlegroups.com.
Visit this group at http://groups.google.com/group/nashicas.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages