+ Reply to Thread
Results 1 to 17 of 17

Non Array Formula to Extract Values and Ignore Blanks

  1. #1
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,012

    Non Array Formula to Extract Values and Ignore Blanks

    Looking for non-array formula to extract values in A2:D26 and ignore blanks. Extracted values to go into G2:J21 without blanks. See sample file.

    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Non Array Formula to Extract Values and Ignore Blanks

    In G2, copied across & down\;
    =IFERROR(INDEX(A:A,AGGREGATE(15,6,ROW($A$2:$A$26)/($A$2:$A$26<>""),ROWS(G$2:G2))),"")
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Non Array Formula to Extract Values and Ignore Blanks

    While that works in your sample, it may not ALWAYS work, if the blanks are in different rows. To be safe, use this instead:

    =IFERROR(INDEX(A:A,AGGREGATE(15,6,ROW(A$2:A$26)/(A$2:A$26<>""),ROWS(G$2:G2))),"")

  4. #4
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,012

    Re: Non Array Formula to Extract Values and Ignore Blanks

    Glenn Kennedy: I am getting in accurate pull when I adjusted the formula range from A:A to A$2:A$26. Please help fix. See adjusted formula.

    Please Login or Register  to view this content.
    Thanks

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Non Array Formula to Extract Values and Ignore Blanks

    Change it back. It was intended to be A:A.

  6. #6
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,012

    Re: Non Array Formula to Extract Values and Ignore Blanks

    Glenn Kennedy: but if it were to start from A2:A26, can you help adjust the formula?

    Thanks.

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Non Array Formula to Extract Values and Ignore Blanks

    There is NO advantage in setting an exact range. INDEX is perfectly efficient using a whole column reference. However, if that's what you really want....

    =IFERROR(INDEX(A$2:A$26,AGGREGATE(15,6,ROW(A$2:A$26)-ROW(A$2)+1/(A$2:A$26<>""),ROWS(G$2:G2))),"")

  8. #8
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,012

    Re: Non Array Formula to Extract Values and Ignore Blanks

    Glenn: works like a charm. Thanks for the solution.

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Non Array Formula to Extract Values and Ignore Blanks

    No problem.

  10. #10
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,012

    Re: Non Array Formula to Extract Values and Ignore Blanks

    Glenn: noticed that formula is not pulling accurate values when there is a value in range A2:A27 and there is no corresponding value in B2:B27. See A15 (Pearlie) and B15 (blank) and A24 (June) and B24 (blank). Please help fix formula to account for this. See inaccurate pull in red color (G15:H21). See attached file.
    Attached Files Attached Files

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Non Array Formula to Extract Values and Ignore Blanks

    Apols. Read post 3 and adapt it. I'm away from the PC.

  12. #12
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,012

    Re: Non Array Formula to Extract Values and Ignore Blanks

    Glenn Kennedy: adapted and still not working.

  13. #13
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Non Array Formula to Extract Values and Ignore Blanks

    This works with your sample:

    =IFERROR(INDEX(A$2:A$27,AGGREGATE(15,6,ROW(A$2:A$27)-ROW(A$2)+1/($A$2:$A$27<>""),ROWS(G$2:G2)))&"","")

  14. #14
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Non Array Formula to Extract Values and Ignore Blanks

    However, if col A is blank and there is an entry in B, C, or D - it still will not work. can that happen in your real data?

  15. #15
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,012

    Re: Non Array Formula to Extract Values and Ignore Blanks

    Glenn Kennedy:
    Please Login or Register  to view this content.
    works! Great solution Glenn. Thanks my friend.

  16. #16
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Non Array Formula to Extract Values and Ignore Blanks

    Twice in one thread... you're welcome. No problem....

  17. #17
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,012

    Re: Non Array Formula to Extract Values and Ignore Blanks

    Glenn: col A (A2:A27) will never be completely blank. There are going to be values in column A. However, a few cells might contain blank cells and corresponding values. This formula addressed that scenario.
    Please Login or Register  to view this content.
    Thanks for the great solution.

+ 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. Min If Dates - Ignore Blanks/Zeroes - No Array Formula??
    By yoshi_5 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-14-2017, 09:20 PM
  2. Replies: 11
    Last Post: 10-27-2016, 07:33 PM
  3. [SOLVED] sumproduct to rank values but ignore blanks
    By Blake 7 in forum Excel General
    Replies: 6
    Last Post: 05-24-2016, 03:30 PM
  4. How to ignore blanks in an Index/Match Array Formula
    By michaelcarrera in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-06-2015, 08:50 PM
  5. [SOLVED] array formula count "number of" - can it ignore blanks
    By nigelog in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-24-2014, 09:33 AM
  6. Replies: 3
    Last Post: 09-17-2010, 05:59 AM
  7. Median as an Array does not ignore blanks
    By ctbrian in forum Excel General
    Replies: 8
    Last Post: 05-06-2010, 03:12 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