locked
Remove conditional formatting from a column RRS feed

  • Question

  • I have an excel worksheet that somehow is adding prefixes to the value entered after a user enters a value.

    Example, one column is Thickness, and the value entered is .5 after you hit enter or tab out, becomes .5 in.

    I do not see any macros of conditional formatting that does this, but I am a c# developer, and do not know where to look to take off the formatting (or code) that is adding the ' in.' after the value

    Can you tell me a few places to look to determine this;

    Thanks

    Wednesday, January 20, 2016 8:03 PM

Answers

  • I found it, the cell had a custom format pattern, I switched it to being a standard Number with 3 decimal places.
    • Marked as answer by David_JunFeng Friday, January 29, 2016 9:37 AM
    Wednesday, January 20, 2016 8:12 PM

All replies

  • I found it, the cell had a custom format pattern, I switched it to being a standard Number with 3 decimal places.
    • Marked as answer by David_JunFeng Friday, January 29, 2016 9:37 AM
    Wednesday, January 20, 2016 8:12 PM
  • Hi, Data.Jugggler

    Congratulation, I am glad to hear you have resolved your issue. If you want to change cell format code programmatically, you could refer to below code:

    Worksheets("Sheet1").Range("A17").NumberFormat = "General" 
    Worksheets("Sheet1").Rows(1).NumberFormat = "hh:mm:ss" 
    Worksheets("Sheet1").Columns("C"). _ 
    NumberFormat = "$#,##0.00_);[Red]($#,##0.00)"

    For more information, click here to refer about Range.NumberFormat Property (Excel)

    Thursday, January 21, 2016 4:04 AM