View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Invalid Number Format in Excel 10

Works fine in MacXL10. Are you sure the worksheet isn't protected?

In article ,
hzrabbie wrote:

I want to display "N/C" (meaning "No Charge") to appear when the value
of a numeric cell is zero.

In Excel 9, this works fine: Range("B20").NumberFormat =
"$#,###;($#,###);N\/C"

In Excel 10, this statement causes a run-time error 1004 (Unable to set
property)

I also tried: Range("B20").NumberFormat = "$#,###;($#,###);NC" but
without success, so it's not the slash that's causing the problem.

Any suggestions?

Thanks!