+ Reply to Thread
Results 1 to 8 of 8

Macro Code - Modify to include > or = to

  1. #1
    Forum Contributor
    Join Date
    08-22-2005
    MS-Off Ver
    Office 365
    Posts
    342

    Macro Code - Modify to include > or = to

    Hello,

    I have the following macro code excel 2010

    I am getting a runtime error on the bold/underlin section in the code below.

    This code kicks in when M > 14 ... however M can also equal N/A.

    Looking to have that part of the coded modified so that if M is > 14 and or equals N/A it shows the pop up as per the macro.

    If you need to know N/A is generated based on the following forumula
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Thanks in advance.
    Last edited by SVTF; 10-22-2014 at 05:19 PM.

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Macro Code - Modify to include > or = to

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Macro Code - Modify to include > or = to

    Perhaps

    Please Login or Register  to view this content.
    - Battle without fear gives no glory - Just try

  4. #4
    Forum Contributor
    Join Date
    08-22-2005
    MS-Off Ver
    Office 365
    Posts
    342

    Re: Macro Code - Modify to include > or = to

    @JOHN H. DAVIS ... no run time error however the rest of the macro does not work... perhaps I am entering wrong.

    @PCI get a runtime error with your option - type mis match error

    Thanks for the suggestions rep sent ... anyone else have a suggestion on how to modifiy the macro as per request in post # 1
    Last edited by SVTF; 10-22-2014 at 03:36 PM.

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Macro Code - Modify to include > or = to

    For that one IF statement:

    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Macro Code - Modify to include > or = to

    Can you send a short sample of your data.
    Try perhaps

    Please Login or Register  to view this content.

  7. #7
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Macro Code - Modify to include > or = to

    two changes

    Please Login or Register  to view this content.
    and change your formula in column M to this

    Please Login or Register  to view this content.
    I (and maybe us/we) were under the assumption that the N/A was text, but it's actually the return of NA(), which is the error. I was comparing "N/A" to the error #N/A....

    anyways this seem to work....
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

  8. #8
    Forum Contributor
    Join Date
    08-22-2005
    MS-Off Ver
    Office 365
    Posts
    342

    Re: Macro Code - Modify to include > or = to

    @JOHN H. DAVIS, @PCI @judgeh59 ... Thank you for your assistance.

    Solved - Rep Sent

+ 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. [SOLVED] Modify Macro Code to include an extra Pop Up with different trigger
    By SVTF in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-15-2014, 11:49 AM
  2. Help needed to modify the code to include the logic
    By reddys0909 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-17-2013, 09:28 PM
  3. Modify code to include header formatting
    By msmick in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-11-2011, 07:41 PM
  4. Need help to modify code to include more than 1 Column
    By coreytroy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-15-2007, 02:08 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