+ Reply to Thread
Results 1 to 5 of 5

Select Cell if Blank

  1. #1
    Registered User
    Join Date
    10-30-2008
    Location
    in a house
    Posts
    17

    Select Cell if Blank

    Hi,

    I need a Script that will allow me to select a cell 'C18'
    If C18 is not blank, move down to C19
    If C19 is not blank, move down to C20
    ETC until;
    If C37 is not blank, [alert user] Please use a new order form!


    Any help would be appreciated, I have tried many things and searched for quite some time, and have gotten, well no-where.

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444
    Hi,

    Try this.

    Please Login or Register  to view this content.
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    Alternatively, if you can assume C17 to never be blank (ie header) and C38 to always be blank... and that you don't have blanks interspersed ie C18 text, C19 blank, C20 text then you avoid looping along the lines of:

    Please Login or Register  to view this content.
    Another alternative - perhaps a little more robust:

    Please Login or Register  to view this content.
    Last edited by DonkeyOte; 01-19-2009 at 06:10 AM.

  4. #4
    Registered User
    Join Date
    10-30-2008
    Location
    in a house
    Posts
    17
    Appreciate your responses, it helped in learning more about the process; I managed to get what I wanted using this code

    Please Login or Register  to view this content.
    I would like to incorporate my error message if runtime error 1004 occurs, so something along these lines

    Please Login or Register  to view this content.
    Which doesn't work ... Could I pick your brains for another bit?

  5. #5
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    See if this works for you:

    Please Login or Register  to view this content.
    HTH

    Jason

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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