+ Reply to Thread
Results 1 to 3 of 3

Running Error If then else formula in Macro

  1. #1
    Registered User
    Join Date
    08-15-2014
    Location
    India
    MS-Off Ver
    2007
    Posts
    57

    Running Error If then else formula in Macro

    Hi,

    Please advice whats wrong i am doing in below code:

    Please Login or Register  to view this content.
    Note: if the value of cell "h2" is equal to "Zero" then the else part of the code should run however i am still getting the error.

    Thanks

    Reg,
    CVishu
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Running Error If then else formula in Macro

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    09-08-2014
    Location
    Charlotte, NC
    MS-Off Ver
    2010
    Posts
    8

    Re: Running Error If then else formula in Macro

    Change your If statement to say

    If Range("H2").Value <> 0 Then

+ 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. error when running MS Word macro commands in Excel macro
    By bsapaka in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-01-2014, 01:30 PM
  2. #REF Error in Formula after running Macro
    By junijl in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-18-2013, 10:27 AM
  3. Error in running macro
    By ashahdeo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-11-2012, 08:55 AM
  4. Cannot find macro error when running a macro from a macro in a diffrent workbook.
    By Acrobatic82 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-05-2010, 09:22 AM
  5. Formula Error when running Macro
    By treeleaf20 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-10-2009, 09:50 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