+ Reply to Thread
Results 1 to 6 of 6

Loop rows and make a Range null if criteria met in defined Column

  1. #1
    Registered User
    Join Date
    01-31-2016
    Location
    Florida, USA
    MS-Off Ver
    13
    Posts
    26

    Loop rows and make a Range null if criteria met in defined Column

    I have this VBA code:

    Please Login or Register  to view this content.
    What I need to do is look at column "X" (Cell Count 24) and make the Range B:T starting at row "2" null if "NO" and then Loop it to the next row and so on and stop at row 600. This code obviously ONLY sees Range("B2:T2") so no matter what ALWAYS Nulls that range.
    How do I change the range to match the current row to match column "X"?
    Last edited by alansidman; 04-03-2016 at 09:18 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,704

    Re: Loop rows and make a Range null if criteria met in defined Column

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (Because you are new to the forum, I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    01-31-2016
    Location
    Florida, USA
    MS-Off Ver
    13
    Posts
    26

    Re: Loop rows and make a Range null if criteria met in defined Column

    Sorry and Thank You I am going to read them right now......

  4. #4
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    867

    Re: Loop rows and make a Range null if criteria met in defined Column

    Try this way:

    Please Login or Register  to view this content.
    .. and don't forget to have fun!
    Bogdan.

    mark SOLVED and Add Reputation if my answer pleases you

  5. #5
    Registered User
    Join Date
    01-31-2016
    Location
    Florida, USA
    MS-Off Ver
    13
    Posts
    26

    Re: Loop rows and make a Range null if criteria met in defined Column

    That is PERFECT! Thank you...

  6. #6
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    867

    Re: Loop rows and make a Range null if criteria met in defined Column

    Glad to help! Thank you also for the rep point.

+ 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. VBA Loop that check cells in a column(Range)then copy if criteria match
    By Eben in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-14-2015, 02:43 AM
  2. Count rows with multiple null and not null criteria
    By carlostheba in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-28-2014, 05:16 AM
  3. [SOLVED] Deleting a range with defined column widths but undefined numbers of rows.
    By moosetales in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-18-2014, 05:30 PM
  4. How to make a named range null or empty if count = 0 (no values present)
    By MCunningham in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-15-2013, 12:12 PM
  5. Macro to Insert defined integer into range defined by variable criteria
    By stereofeedback in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-06-2013, 12:33 PM
  6. Macro to hide rows based on defined range in a column
    By derryt in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-27-2012, 12:20 PM
  7. Macro, autofilter, delete rows outside date range, defined names as criteria
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-30-2011, 04:10 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