+ Reply to Thread
Results 1 to 10 of 10

Need a formula that doesn't leave blank rows

  1. #1
    Forum Contributor
    Join Date
    10-09-2018
    Location
    Quebec, Canada
    MS-Off Ver
    Office 365
    Posts
    125

    Need a formula that doesn't leave blank rows

    Good morning Forum,

    Can anyone help me with a formula, if possible, that would leave no blank rows in my "result" section, as shown below.

    Capture.PNG

    I know it is possible if I keep the itermediate column, with this array formula

    Please Login or Register  to view this content.
    but I really need to get rid of that column.

    Thank you in advance!
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Need a formula that doesn't leave blank rows

    Which are you classing as the intermediate column???
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    10-09-2018
    Location
    Quebec, Canada
    MS-Off Ver
    Office 365
    Posts
    125

    Re: Need a formula that doesn't leave blank rows

    Hello Ali Sorry, the one with the blank rows, that means range from B13 to B19 in the attached file.

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,598

    Re: Need a formula that doesn't leave blank rows

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Ben Van Johnson

  5. #5
    Forum Contributor
    Join Date
    03-29-2013
    Location
    lakewood, usa
    MS-Off Ver
    exce2013
    Posts
    112

    Re: Need a formula that doesn't leave blank rows

    Sybille, try the following in B13 and pul down as needed. Look at the description of AGGREGATE in excel help.
    =IFERROR(INDEX(B$3:B9,AGGREGATE(15,6,(ROW($B$3:$B$9)-ROW($B$3)+1)/(A3:A9=""),ROWS($B$3:B3))),"")
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    10-09-2018
    Location
    Quebec, Canada
    MS-Off Ver
    Office 365
    Posts
    125

    Re: Need a formula that doesn't leave blank rows

    Thank you wyowhite and protonLeah!

    wyo, your formula works but gives the last row twice.

    Ben, works great!

    Now I just have to investigate both your suggestions to add them to my knowledge book

    Have a good day.

  7. #7
    Forum Contributor
    Join Date
    10-09-2018
    Location
    Quebec, Canada
    MS-Off Ver
    Office 365
    Posts
    125

    Re: Need a formula that doesn't leave blank rows

    Ben, I am trying to understand the formula. There is just one thing that bugs me: "...ROW(A$1:A$7)...".
    Why this range?
    Thank you again.

  8. #8
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,598

    Re: Need a formula that doesn't leave blank rows

    You want to return values from an array spanning rows B3 - B9; but, they are elements 1 - 7 of the array to be used by the INDEX function (rows are off by 2).

    The IF function looks at A3-A9 testing for blanks (i.e., no "x") that evaluates to: {True;True;True;False;True;False;True}. You want to map to the elements of the array.
    If you use Row(A3:A9) it results in the array {3;4;5;6;7;8;9} which is ANDed with the IF test to produce {3;4;5;FALSE;TRUE;7;FALSE;9}. This would be passed to SMALL and result in a list starting with Client3, but 8 & 9 would produce errors because they are beyond the array.

    So, you could use:
    IF($A$3:$A$9<>"x",ROW($A$3:$A$9)-2)
    or
    IF($A$3:$A$9<>"x",ROW($A$1:$A$7))
    or even:
    IF($A$3:$A$9<>"x",{1;2;3;4;5;6;7})

  9. #9
    Forum Contributor
    Join Date
    10-09-2018
    Location
    Quebec, Canada
    MS-Off Ver
    Office 365
    Posts
    125

    Re: Need a formula that doesn't leave blank rows

    Wow! I get it now. Thank you Ben

  10. #10
    Forum Contributor
    Join Date
    03-29-2013
    Location
    lakewood, usa
    MS-Off Ver
    exce2013
    Posts
    112

    Re: Need a formula that doesn't leave blank rows

    My Bad. the array for the comparison needs to be absolute here is the correction.
    =IFERROR(INDEX(B$3:B9,AGGREGATE(15,6,(ROW($B$3:$B$9)-ROW($B$3)+1)/($A$3:$A$9=""),ROWS($B$3:B3))),"")

+ 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 leave leave cell blank if all cells added together = 0
    By jmitch26 in forum Excel General
    Replies: 3
    Last Post: 07-30-2019, 11:00 PM
  2. Replies: 6
    Last Post: 02-13-2019, 05:47 AM
  3. [SOLVED] Formula question IF cell is blank, leave blank if not D6-E6
    By krisryan in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-24-2018, 10:56 PM
  4. Sort rows based on two columns and leave blank row between them
    By andriano in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-24-2014, 06:38 PM
  5. Replies: 4
    Last Post: 06-24-2013, 07:17 AM
  6. Replies: 1
    Last Post: 05-19-2011, 09:53 AM
  7. Replies: 15
    Last Post: 06-28-2010, 02:06 PM

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