+ Reply to Thread
Results 1 to 9 of 9

Selcet cases after first case not working

  1. #1
    Registered User
    Join Date
    01-06-2020
    Location
    Denmark
    MS-Off Ver
    2013
    Posts
    4

    Selcet cases after first case not working

    Hello

    I have a problem where when I fill out a specific cell with "x" it's suppose to give a value in another worksheet. It's working for the first Select case, but cases that comes after isn't working.

    I Run a If Isempty code to start with to avoid a Mismatch error.

    My code Is

    Please Login or Register  to view this content.
    Last edited by Martinw94; 01-17-2020 at 10:28 AM.

  2. #2
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,957

    Re: Selcet cases after first case not working

    Hi Martinw94

    Welcome to our Forum...

    Please take a moment to read our forum rules...here
    Your post does not comply with Rule # 2
    2. Programming code must be enclosed in code tags to improve readability. (A, Z)
    Please Login or Register  to view this content.
    So...

    Edit your post
    Highlight the code and press the # button

    This post should receive no further attention until OP has complied...
    Last edited by Sintek; 01-06-2020 at 09:15 AM.
    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 [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,971

    Re: Selcet cases after first case not working

    This part:

    Please Login or Register  to view this content.
    returns True if H3 is empty and False otherwise.
    Everyone who confuses correlation and causation ends up dead.

  4. #4
    Registered User
    Join Date
    01-06-2020
    Location
    Denmark
    MS-Off Ver
    2013
    Posts
    4

    Re: Selcet cases after first case not working

    Thanks

    Do you have an idea on how to get it to check all of the cells then? :D

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,971

    Re: Selcet cases after first case not working

    If you want to test if they are all empty, you can use:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    01-06-2020
    Location
    Denmark
    MS-Off Ver
    2013
    Posts
    4

    Re: Selcet cases after first case not working

    Cheers thanks alot :D

  7. #7
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,957

    Re: Selcet cases after first case not working

    Perhaps...Code in sheet1.module
    Please Login or Register  to view this content.
    Last edited by Sintek; 01-06-2020 at 10:38 AM.

  8. #8
    Registered User
    Join Date
    01-06-2020
    Location
    Denmark
    MS-Off Ver
    2013
    Posts
    4

    Re: Selcet cases after first case not working

    When i inserted this code the day before yesteday it work like a charm and now its not working :/
    I've tried removing all ranges except "H3" and when I do that It works. When I bring in the remaining cells it gives the following error: Method 'Range' of object' _Worksheet' Failed

    Can you help me out? Been trying to fix for hours now

  9. #9
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,957

    Re: Selcet cases after first case not working

    this code the day before yesteday
    What code...Perhaps its time you upload a sample file....

+ 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. Replies: 2
    Last Post: 09-19-2017, 03:27 PM
  2. [SOLVED] Select case where value is numeric then select other cases
    By scottiex in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-06-2015, 11:03 PM
  3. [SOLVED] Userform : add value according selcet column range : Solved by (nilem)
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-23-2014, 06:12 AM
  4. Add cases opened and closed for each month and specifics about the cases.
    By ChrisLaRoc in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-04-2014, 08:19 PM
  5. [SOLVED] code not working in all or all cases
    By s4driver in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-09-2013, 11:32 AM
  6. adding more cases to case statement
    By johnson1421 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-25-2012, 10:49 AM
  7. Proper Case not working
    By duckboy1981 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-10-2008, 08:21 AM

Tags for this Thread

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