+ Reply to Thread
Results 1 to 5 of 5

Find Next Non Blank Cell In Column Then ....

  1. #1
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    265

    Find Next Non Blank Cell In Column Then ....

    Hi All,

    I have been trying to do this for sometime now and keep coming up blank..

    I am Writing a Code...

    In this code i have used A Lookup type line to find a Cell in Column A with a Specific String in.. All Good So Far....

    I then Activate the Cell containing this String.. So Say it was in A2 Then A2 would now be the ActiveCell.

    What i need to do now is as Follows..:

    1. I need to Find the NEXT NON Blank cell after the ActiveCell. Say this was A9

    2. I need to Select the Range(ActiveCell(A2): Next Non BlankCell -1)

    3. Once this has been Done i need to Resize the Selected Range to incorporate The Cells In Columns B,C,D and then Copy this Final Range which would be A2:D8



    A B C D
    1
    2 String
    3
    4
    5
    6
    7
    8
    9 2nd String

    Any Help would be greatly appreciated.

    Regards

    JRidge

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Find Next Non Blank Cell In Column Then ....

    Hi,

    One way

    Please Login or Register  to view this content.
    Just a point but try and avoid code which activates or selects ranges/sheets. It's rarely necessary and just slows things down. Just define the ranges/sheets in the code.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    265

    Re: Find Next Non Blank Cell In Column Then ....

    But i don#t know the Range until i have done the Find and selected the Cell?

    The string i am searching is always in column A, There might or Might Not be Blank Cells Between the Found Cell in A and the Next Cell that is not Blank. I need to Copy from the Active Cell to the Cell before the next cell that is non Blank and these cells in B,C and D aswell?

    With Your Help I now have:

    Please Login or Register  to view this content.
    Which works.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Find Next Non Blank Cell In Column Then ....

    Quote Originally Posted by JRidge View Post
    But i don#t know the Range until i have done the Find and selected the Cell?
    ...but that isn't what you said in the original. There you said that you started with the active cell and then you said...
    "What i need to do now is as Follows..:

    The 'as follows' was to copy A2:D8 which is precisely what my single line of code does.

  5. #5
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    265

    Re: Find Next Non Blank Cell In Column Then ....

    Hi Richard,

    In this Example:

    A B C D
    1
    2 String
    3 2nd String
    4 String3
    5 String4
    6 (Merged With A7)String5
    7 (Merged with A6)
    8 String6
    9 String7

    When i use your Line of code:

    Please Login or Register  to view this content.
    in this instance..

    Active Cell is A2

    It allways copies down to the Merged Cell... It Sees the Merged cell as the next Non Blank Cell? So It copies A2:D5

    When it should only copy A2:D2


    But If the ActiveCell was The Cell with String5 in then it works fine and only Copies A6:D7
    Any Ideas...

    Regards

    JRidge

+ 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. Replies: 4
    Last Post: 05-15-2014, 09:32 AM
  2. Find blank cell, insert formula to find median of above cell range
    By lilyeye in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-05-2013, 11:58 AM
  3. [SOLVED] Find first non-blank cell after a group of blanks copy offset cells, find next blank, loop
    By gwsampso in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-21-2012, 06:11 AM
  4. Find a blank cell and calculate the average of all cells above till the next blank
    By joshnathan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-27-2012, 11:51 AM
  5. Find first blank cell in column if rightmost cell is non blank
    By Mothman in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-19-2010, 02:22 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