+ Reply to Thread
Results 1 to 6 of 6

Exclude Blank Rows With Array

Hybrid View

  1. #1
    Banned User!
    Join Date
    03-06-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    295

    Exclude Blank Rows With Array

    I have been trying to accomplish something. Include only rows with data and moving them up so there aren't any blank rows between from F2:I9 on the Summary worksheet. What am I doing wrong?

    I appreciate any help or suggestions.
    Attached Files Attached Files
    Last edited by billgyrotech; 12-14-2016 at 06:11 PM.

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,864

    Re: Exclude Blank Rows With Array

    Here is an array entered formula that will populate column F:
    Formula: copy to clipboard
    =IF(ROWS(F$1:F1)>COUNT(A$2:A$13),"",INDEX(A$2:A$13,SMALL(IF(A$2:A$13<>"",ROW($A$1:$A$12)),ROW(A1))))
    The following formula (regular) can then be pasted into G2 and copied down and across:
    Formula: copy to clipboard
    =INDEX(B$2:B$9,MATCH($F2,$A$2:$A$9,0))
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Banned User!
    Join Date
    03-06-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    295

    Re: Exclude Blank Rows With Array

    Thank you that works great! I have a question in order to learn what is going on. What if I insert a row above the tables in the 'Summary' worksheet?

    I am trying to understand how the codes work.

    Thank you for the help.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,864

    Re: Exclude Blank Rows With Array

    Modify the array entered formula in F2 as follows:
    Formula: copy to clipboard
    =IF(ROWS(F$1:F1)>COUNT(A$2:A$13),"",INDEX(A$2:A$13,SMALL(IF(A$2:A$13<>"",ROW($A$1:$A$12)-MIN(ROW(A$1:A$12))+1),ROWS(A$1:A1))))
    Once activated, by simultaneously pressing Ctrl, Shift and Enter while F2 is still in edit mode, copy down to F9. After a new row one is inserted in the spreadsheet the formula will still display the correct number which the Index/Match formulas in the corresponding columns will use. To see how the formula handles the additional row run Evaluate Formula from the Formulas tab.
    Let us know if you have any questions.

  5. #5
    Banned User!
    Join Date
    03-06-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    295

    Re: Exclude Blank Rows With Array

    Not sure how but I played with the code and came up with this which seems to work. I put this in F3 and copied down.

    =IF(ROWS(F$1:F1)>COUNT(A$2:A$13),"",INDEX(A$2:A$12,SMALL(IF(A$3:A$13<>"",ROW($A$2:$A$12)),ROW(A1))))

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,864

    Re: Exclude Blank Rows With Array

    I am glad that you have a formula that does what you need. Please take a moment to mark the thread as 'Solved' using the thread tools link above your first post. I hope that you have a blessed day.

+ 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] IF Sumproduct function in excel to exclude blank rows
    By newbie4 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-02-2015, 12:22 AM
  2. Replies: 0
    Last Post: 05-16-2013, 09:52 AM
  3. Exclude blank/FALSE cells in in Excel array IF formula output
    By sushix in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-08-2013, 11:42 AM
  4. Exclude blank rows from CSV file
    By mcinnes01 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-05-2011, 10:52 AM
  5. Set Print Area Macro - Exclude Blank Rows
    By shudder in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-27-2009, 10:31 PM
  6. [SOLVED] Sort Macro to Exclude Blank Rows?
    By ScottPcola in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-05-2006, 03:15 PM
  7. Copy rows, but exclude blank rows
    By Mary in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-01-2005, 04: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