+ Reply to Thread
Results 1 to 2 of 2

Checking cells one by one

  1. #1
    Registered User
    Join Date
    08-04-2022
    Location
    Blackburn
    MS-Off Ver
    Excel 2013
    Posts
    39

    Checking cells one by one

    Hey all,

    Just wondering if there is a code to start off in one cell and continue moving down a cell up until a limit?

    For example, say I wanted to start in B5 and move down to B20 while adding 1 to the value in each cell? or If I wanted to start in a cell and move down looking for a certain word for an if statement and for every cell that contains this word then delete the row that I'm on?

    Cheers.

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Checking cells one by one

    You appear to have flagged the thread as SOLVED prior to any solution being provided, so I've no idea if you still require answers to this or not.

    In the interest of people that may find this in the future when searching for a solution to a similar issue, below are examples of code that will work for the scenarios asked about above.

    This one will add 1 to the value of each cell in B5:B20
    Please Login or Register  to view this content.
    And this one will delete any rows where the cell value of column B for that row is an x
    Please Login or Register  to view this content.
    Note, when you're deleting rows you need to loop backward, from the bottom up, to save is skipping rows in instances where two consecutive rows contan x.

    There are other, non looping ways of doing performing these actions, but your thread title specifically asks for checking them one by one.

    BSB

+ 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] Nested If statement, checking multiple cells for Blank cells
    By JLeague in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-30-2015, 11:18 AM
  2. Locking/Unlocking Cells By Checking Other Cells
    By brandylee8288 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-07-2013, 05:25 PM
  3. [SOLVED] how to modify code from checking all cells to range of cells
    By behnam in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-03-2013, 11:16 AM
  4. [SOLVED] Checking for empty cells and cells with errors.
    By Max_Taylor in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-16-2012, 06:10 PM
  5. Checking the Cells in Sheet1 with Cells in Sheet2 and replace
    By Checking the cells in Sheet1 with Sheet2 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-19-2006, 04:29 AM
  6. copying cells by checking color of the cells
    By JJJ010101 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-24-2006, 02:42 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