+ Reply to Thread
Results 1 to 4 of 4

Change code when a blank cell reached

  1. #1
    Registered User
    Join Date
    02-10-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    58

    Change code when a blank cell reached

    Hi,

    I have written a data extraction code here. The Cells.Find value will be taken from Cell A2, A3, A4... down. I have put "For x = 2 to 88" but data set is not 88 rows long and i do not wish to change it everytime i change row numbers. What i want to do, is that when a blank cell (Ax) is reached, i want the code to jump to the Red colored code. How would i do this? I've tried If FindValue = "" GoTo ... but i keep getting errors

    Thanks!

    p.s. this is my first time writing such a long code and I've learnt this for a week so it'll probably look messy and junky to you.


    Please Login or Register  to view this content.
    Last edited by russwongg; 08-26-2014 at 11:25 AM.

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Change code when a blank cell reached

    There are many, many, ways you can approach this problem. I think the solution that might make the most sense to you would be to do something like this. I can't really understand the big picture so hopefully this will put you on the right track.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-10-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    58

    Re: Change code when a blank cell reached

    I understand what's going on here. It's an interesting way of tackling the problem. Is there a way to edit the code such that once bEmpty = True and jumps to the second half of the code x restarts to 2 again?

    Please Login or Register  to view this content.
    Last edited by russwongg; 08-27-2014 at 12:12 AM.

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Change code when a blank cell reached

    Yeah its possible but I can't understand why you would want to do that. I am afraid to assist you further because I really have no idea what you are trying to do and I don't want to confuse things. Maybe if you submit an example workbook which clearly shows a before and after product I can write the code to do that.

+ 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] Counting number of 1s in a row until blank cell is reached.
    By wjhansen in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-23-2013, 08:00 AM
  2. Show A1 in C3, then A2 in C3, then A3 in C3 until blank cell reached on button press
    By jamiepullen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-06-2008, 06:04 PM
  3. Stopping A Loop When A Blank Cell Is Reached
    By Aaron1978 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-06-2006, 07:48 AM
  4. Autofill until blank cell is reached
    By uberathlete in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-04-2005, 09:55 PM
  5. Autofill until blank cell is reached
    By uberathlete in forum Excel General
    Replies: 7
    Last Post: 11-04-2005, 01:50 PM

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