2

I am using epplus for Excel. how can use greater than and less than condition for showing debit and credit value with dr and cr.

  • if value is -123456 I want to show it like this: ₹1,23,456 DR
  • if value is 123456 I want to show it like this:₹1,23,456 CR

I'm using Style.Numberformat.Format = "₹ #,###.00" but it's showing results this way: -₹1,23,456. How can I make it to append cr and dr?

Gilles
  • 9,269
  • 4
  • 34
  • 53
amit jain
  • 305
  • 4
  • 8

1 Answers1

1

Do something like this:

Style.Numberformat.Format = "₹ #,###.00 \"CR\";₹ #,###.00 \"DR\""
Ernie S
  • 13,902
  • 4
  • 52
  • 79
  • @amitjain I am not sure what you mean. The above format will imply a condition that if > 0 put CR; if < 0 put DR. Do you mean you want to use a different number besides 0? – Ernie S Oct 21 '15 at 20:18