+ Reply to Thread
Results 1 to 7 of 7

Find next Blank row in a Cell If a condition is met

  1. #1
    Registered User
    Join Date
    06-26-2015
    Location
    Limerick, Ireland
    MS-Off Ver
    MS2007
    Posts
    15

    Find next Blank row in a Cell If a condition is met

    Hi All,
    This forum has provided me great help over the past few months but I cannot find a solution to the below problem I have
    Basically I have a file that is sorted by date. Basically if the value in column A has the name Immediate, I need to cut and paste this into the row after the first blank row (as this sums up the total for that day - i need to take immediate out of that subtotal and add the row seperately in the row after where it is subtotaled)
    Immediate snapshot.PNG

  2. #2
    Valued Forum Contributor
    Join Date
    03-17-2012
    Location
    Warsaw, Poland
    MS-Off Ver
    2007/2010
    Posts
    555

    Re: Find next Blank row in a Cell If a condition is met

    Can you attach a workbook with how the data looks before the macro and what it should look like after the macro?
    By your description:
    Take Immediate from row 4 and paste it into row 9 (Basically if the value in column A has the name Immediate, I need to cut and paste this into the row after the first blank row)
    Take Immediate from 14 and paste it into 25 or 9 again? (both is basically one row after an empty row).
    If you think that my answer was helpful, please click on the "Add to this user's Reputation" button.

  3. #3
    Registered User
    Join Date
    06-26-2015
    Location
    Limerick, Ireland
    MS-Off Ver
    MS2007
    Posts
    15

    Re: Find next Blank row in a Cell If a condition is met

    Thanks for the extra quick response Bishonen. basically I want it to loop until the very last row in the file, could be row 10,000.. Attached is the before and after picture
    Take Immediate from row 4 and paste it into row 9 (Basically if the value in column A has the name Immediate, I need to cut and paste this into the row after the first blank row) - CORRECT
    Take Immediate from 14 and paste it into 25 or 9 again? (both is basically one row after an empty row). - Paste it into Row 25
    Sample File.xlsx
    Attached Images Attached Images

  4. #4
    Valued Forum Contributor
    Join Date
    03-17-2012
    Location
    Warsaw, Poland
    MS-Off Ver
    2007/2010
    Posts
    555

    Re: Find next Blank row in a Cell If a condition is met

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-26-2015
    Location
    Limerick, Ireland
    MS-Off Ver
    MS2007
    Posts
    15

    Re: Find next Blank row in a Cell If a condition is met

    Hi Bishonen.
    That was quick!!
    Getting a Debug error on the below line
    iLastRow = Cells(Rows.Count, 1).End(xlUp).Row

  6. #6
    Valued Forum Contributor
    Join Date
    03-17-2012
    Location
    Warsaw, Poland
    MS-Off Ver
    2007/2010
    Posts
    555

    Re: Find next Blank row in a Cell If a condition is met

    change the declaration to long then (assume you simply have more than 30,000'ish rows.

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-26-2015
    Location
    Limerick, Ireland
    MS-Off Ver
    MS2007
    Posts
    15

    Re: Find next Blank row in a Cell If a condition is met

    That has fixed it.. Bishonen my fiend - you are a legend and saved hours of heartache!!!

+ 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] How to condition a blank cell to N/A?
    By maryinwv in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-15-2014, 11:10 AM
  2. [SOLVED] Need to know if a cell is blank if a certain condition is met.
    By Jowel in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 08-05-2013, 03:43 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. Excel 2007 : IF condition for a blank cell
    By kenwatch in forum Excel General
    Replies: 3
    Last Post: 04-10-2010, 10:25 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