+ Reply to Thread
Results 1 to 6 of 6

If Statement Not Working

  1. #1
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    431

    If Statement Not Working

    Greetings,
    I am trying to use the following code. What I want to happen is if value Sheet8.Range("R3").Value does not equal any number found on "Master" range A:A, then a Userform would appear. If Sheet8.Range("R3").Value does equal any number found on "Master" range A:A, then the rest of the macro would run. However, when a value that does match, I am still getting the Userform.
    Please Login or Register  to view this content.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, Suffolk (England), but grew up in Sawley, Derbyshire
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2211 (Windows 11 22H2 64-bit)
    Posts
    65,441

    Re: If Statement Not Working

    I asked you to amend the title of your original thread, not open a new one.

    In the circumstances, I have closed the original thread in favour of this one.
    Ali


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


    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    11,672

    Re: If Statement Not Working

    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  4. #4
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,441

    Re: If Statement Not Working

    without the sheet the code is build for it is always difficult to debug. But your code looks overcomplicated, all you want to know is if a certain value is available in a specific column

    I think this can do the trick too
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    431

    Re: If Statement Not Working

    Roel,
    Thank you much!!!! The code works GREAT!!!
    Sintek,
    Thank you as well for your suggestion!

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    11,672

    Re: If Statement Not Working

    Glad I could contribute...Tx for rep +

+ 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] If statement on working out percentage and based on time and date not working.
    By Johnny247 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-11-2019, 06:07 PM
  2. [SOLVED] IF And statement not working
    By taflorida in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 12-10-2018, 11:55 AM
  3. If Statement NOT Working
    By Seeker12 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-21-2018, 07:16 PM
  4. multiple if statement not working but not working (make sense!)
    By vanessafvg in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-17-2018, 12:06 AM
  5. if statement not working
    By sebos280 in forum Excel General
    Replies: 2
    Last Post: 11-24-2017, 10:44 AM
  6. Working While Statement Stops Working
    By Verbaruab in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-10-2011, 05:58 PM
  7. If Then Statement - Still Not Working
    By SEOT in forum Excel Programming / VBA / Macros
    Replies: 51
    Last Post: 01-15-2009, 08:53 PM

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