+ Reply to Thread
Results 1 to 3 of 3

how to discard a variable that doesn't work

  1. #1
    Registered User
    Join Date
    08-27-2016
    Location
    Venezuela
    MS-Off Ver
    2010
    Posts
    10

    how to discard a variable that doesn't work

    how to do this again until randomcell is a variable that works? (it works when I get a nonempty cell)
    randomcell is the variable, and in my worksheet
    rng.Cells(randomcell) might be or might not be empty depending on what the value of randomCell was



    Note: I have already declared Rng and all stuff, but you are curious about the code that I'm using:

    Please Login or Register  to view this content.
    I know that there are things like while, do, goto, if, but what is the correct one to use here and how?
    Last edited by fairyrak; 11-09-2016 at 12:48 PM.

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: how to discard a variable that doesn't work

    Maybe :
    Please Login or Register  to view this content.
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  3. #3
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: how to discard a variable that doesn't work

    I would do as #2 but add an exit.
    Please Login or Register  to view this content.

+ 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. How to discard #VALUE! and clear the cell
    By orange109 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-21-2016, 12:29 PM
  2. [SOLVED] Solver - SolverAdd using variable in variable constrains doesn't work
    By drrazor in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-06-2014, 03:19 PM
  3. [SOLVED] F4 doesn't work only in excel, how to make it work again?
    By Dave H in forum Excel General
    Replies: 1
    Last Post: 02-26-2014, 11:22 AM
  4. [SOLVED] Variable doesn't seem to work
    By davepoth in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-11-2013, 08:21 AM
  5. [SOLVED] Macro work in personal workbook, doesn't work in other workbooks
    By Centexcel in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-30-2013, 11:47 AM
  6. [SOLVED] Macro Doesn't Work Through Button, Does Work Through Developer ->Macros Option
    By freybe06 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-27-2013, 11:55 AM
  7. Variable doesn't work based on type
    By carsto in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-11-2007, 09:35 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