+ Reply to Thread
Results 1 to 7 of 7

Skipping cells in vertical range

  1. #1
    Forum Contributor
    Join Date
    09-12-2021
    Location
    Mexico
    MS-Off Ver
    Office 2019
    Posts
    169

    Skipping cells in vertical range

    I am looping through a range in Col A, and need to skip any cell not containing a date. Can someone please suggest a conditional statment in VBA which will allow this? I'm attaching Workbook illustrating the setup. Many thanks for all help.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,810

    Re: Skipping cells in vertical range

    nothing attached. Please read the banner at the top of this page on how to attach.
    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
    Forum Contributor
    Join Date
    09-12-2021
    Location
    Mexico
    MS-Off Ver
    Office 2019
    Posts
    169

    Re: Skipping cells in vertical range

    OK, I tried again. Sorry for the omission the first time.
    Attached Files Attached Files

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,810

    Re: Skipping cells in vertical range

    For starters, the sheet you provided does not have any valid dates. All entries in column A are Text. Is this how your actual data is presented? Do you wish to test this data by first converting the data in Column A to date format? Perhaps we need a bit more of an explanation. What should happen if a cell in Column A is found to be a date?

  5. #5
    Forum Contributor
    Join Date
    09-12-2021
    Location
    Mexico
    MS-Off Ver
    Office 2019
    Posts
    169

    Re: Skipping cells in vertical range

    This is how the data is presented, and the long strings are meant to be dates. There are only 3 possibilities for entries on column A:

    1.- The cell contains a date as text.
    2.- The cell is blank
    3.- The cell contains the string "Exp".

    I need to be able to skip 2.- and 3.- in the loop. Maybe the easiest way to do it would be to include only those cells longer than, say, 5 characters?

    I appreciate your help.

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,810

    Re: Skipping cells in vertical range

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    09-12-2021
    Location
    Mexico
    MS-Off Ver
    Office 2019
    Posts
    169

    Re: Skipping cells in vertical range

    Great, simple and effective. Appreciate your expertise and patience.

+ 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. Fill cells with horizontal and vertical range criteria??
    By kreesh in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-24-2017, 10:03 AM
  2. [SOLVED] VBA To copy cells in a range that contain data skipping formulas
    By lday75 in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 04-16-2016, 04:46 PM
  3. Data Range Manipulations Skipping over unwanted cells.
    By Slurry Pumper in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-05-2016, 03:50 PM
  4. Replies: 1
    Last Post: 05-21-2014, 04:30 PM
  5. Range skipping empty cells
    By CESAR V. ARROYO in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-29-2009, 03:33 PM
  6. Replies: 1
    Last Post: 09-10-2009, 04:01 PM
  7. [SOLVED] return a range of cells from a vertical lookup
    By vickyb_au in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-11-2005, 07:05 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