+ Reply to Thread
Results 1 to 2 of 2

I don't know what is wrong in this sub?? It gives me syntax error(Ignore the asterisks)

  1. #1
    Registered User
    Join Date
    06-21-2017
    Location
    USA
    MS-Off Ver
    2016
    Posts
    1

    I don't know what is wrong in this sub?? It gives me syntax error(Ignore the asterisks)

    Sub InsertIFERROR()
    *** Dim R As Range
    *** For Each R In Selection.SpecialCells(xlCellTypeFormulas)
    ******* R.Formula = "=IFERROR(" & Mid(R.Formula, 2) & ",""0"")"
    *** Next R
    End Sub

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,266

    Re: I don't know what is wrong in this sub?? It gives me syntax error(Ignore the asterisks

    Welcome to the forum!

    Unfortunately your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Ignore - wrong file uploaded
    By ILoveStMartin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-15-2016, 01:45 PM
  2. Compile Syntax Error - unsure whats wrong with Autofilter Label Macro
    By fallwire in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-25-2015, 03:11 AM
  3. [SOLVED] Whats wrong with this IF syntax?
    By Destroy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-22-2014, 02:40 PM
  4. [SOLVED] Syntax error with the following code - Worksheet Changed
    By UsmanBPD in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-28-2012, 08:03 AM
  5. Basic macro syntax error. What is wrong?
    By hunsnowboarder in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-16-2008, 04:26 AM
  6. [SOLVED] Wrong syntax
    By Asta in forum Excel General
    Replies: 2
    Last Post: 02-12-2005, 12:06 PM
  7. [SOLVED] wrong syntax
    By Asta in forum Excel General
    Replies: 1
    Last Post: 02-12-2005, 06:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1