ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Invalid Number Format in Excel 10 (https://www.excelbanter.com/excel-programming/294225-invalid-number-format-excel-10-a.html)

hzrabbie

Invalid Number Format in Excel 10
 
I want to display "N/C" (meaning "No Charge") to appear when the valu
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 se
property)

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

Any suggestions?

Thanks

--
Message posted from http://www.ExcelForum.com


JE McGimpsey

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!



All times are GMT +1. The time now is 11:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com