+ Reply to Thread
Results 1 to 5 of 5

How to correctly define If statements?

  1. #1
    Registered User
    Join Date
    11-09-2011
    Location
    Central, Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    49

    How to correctly define If statements?

    Hi,


    I appear to have an issue with my code. It will populate the whole of my named range with '0's, when in reality I just want to populate those whose value in what I've named as "Table_Month" with a '0' when the value in "Table_Month" is greater than/equal to 10. I assume its just me wrongly defining the IF statement...

    Also, I feel like I can make what I am trying to achieve much more efficient and quick. Does anyone have any suggestions? I can add further info if needs be...

    Below is syntax:


    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: How to correctly define If statements?

    Probably (untested)
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-09-2011
    Location
    Central, Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: How to correctly define If statements?

    Hi,

    Thank you for your response. I want to populate the named range "Table_LM". Your code doesn't seem to reference it anywhere, I assume that would just populate the named range "Table_Month"?

    Thanks.

  4. #4
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: How to correctly define If statements?

    Never mind - misunderstood your code (using a phone). Ignore it.

  5. #5
    Registered User
    Join Date
    11-09-2011
    Location
    Central, Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: How to correctly define If statements?

    Hi,

    Not a problem. Do you see a solution though?

+ 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. keep getting a application define or object define runtime error
    By JRJLHJ1823 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-22-2015, 08:55 PM
  2. Replies: 2
    Last Post: 02-06-2015, 04:30 AM
  3. Replies: 3
    Last Post: 01-30-2014, 12:55 AM
  4. [SOLVED] I cannot get my comparisons in my IF statements to work correctly.
    By jscottr in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-23-2013, 03:43 PM
  5. error 1004 application define or object define
    By jay11 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-11-2011, 04:09 AM
  6. Define named range where user can define size
    By nahousto in forum Excel General
    Replies: 4
    Last Post: 07-06-2009, 05:09 PM
  7. VLookup/IF Statements and Multiple Variable Lookup Not Working Correctly
    By gustafsoni in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-15-2007, 08:50 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