R1C1 Formula - ISERROR Issue

Posted on 2011-05-03
Last Modified: 2012-05-11
Hello Experts,

Have the following lines in some code and it seems to be getting caught. What have I done wrong exactly?


ws.Cells(x, 2).FormulaR1C1 = "=IF(ISERROR(INT(RC[-1]),"""",INT(RC[-1]))"
ws.Cells(x, 3).FormulaR1C1 = "=IF(ISERROR(MOD(RC[-2],1),"""",MOD(RC[-2],1)"

Open in new window

Question by:lkirke
    LVL 81

    Accepted Solution

    ws.Cells(x, 2).FormulaR1C1 = "=IF(ISERROR(INT(RC[-1])),"""",INT(RC[-1]))"
    ws.Cells(x, 3).FormulaR1C1 = "=IF(ISERROR(MOD(RC[-2],1)),"""",MOD(RC[-2],1)"

    Missing paren ;-)


    Author Comment

    Its always the way. Thank you. :)

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
    Introduction This Article is a follow-up to my Mappit! Addin Article (, it was inspired by an email posting I made to EUSPRIG (, I will briefly cover: 1) An overvie…
    This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
    This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now