+ Reply to Thread
Results 1 to 5 of 5

Auto sort and remove blank cells

  1. #1
    Registered User
    Join Date
    08-29-2012
    Location
    australia
    MS-Off Ver
    Excel 2007
    Posts
    86

    Auto sort and remove blank cells

    Hi

    I have attached a copy of a SS I am trying to get sorted. In the first sheet data will be copied and pasted each month, I than have two tables that extract the data, that I need. I then would like in the mail sheet to have a formula that extracts the data from column AV:BL in the first sheet, but excludes where the insurance comp = 52 and removes blank cells.
    I have the following formula, but this does not remove the blank cells. {=iferror(index(a2:q30,small(if(d2:d30<>52,row(a2:q30)-1,rows($1:1)),columns($a:a,"")} this is based if the table was in columns a to q, currently it is in AV:BL.
    The whole idea is that a person copies and pastes the data in the first sheet, then the mail sheet automatically updates for a mail merge
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,901

    Re: Auto sort and remove blank cells

    Try this in A2:

    =IFERROR(INDEX(Sheet3!AV:AV,SMALL(IF((Sheet3!$AY$18:$AY$31<>52)*
    (Sheet3!$AY$18:$AY$31<>""),ROW(Sheet3!$AV$18:$BL$31)),ROWS($18:18))),"")

    Enter with Ctrl+Shift+Enter.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Auto sort and remove blank cells

    I have attached a copy of a SS I am trying to get sorted. In the first sheet data will be copied and pasted each month
    Is that being pasted side-by-side? And if so, why, and why not 1 below the other?

    Anyway, try this...
    =IFERROR(INDEX(Sheet3!AV:AV,SMALL(IF((Sheet3!$AY$18:$AY$31<>52)*(Sheet3!$AY$18:$AY$31<>""),ROW(Sheet3!$AV$18:$BL$31)),ROWS($1:1))),"")
    CSE array-entered

    It doesnt sort, but that would be the next step
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Contributor
    Join Date
    05-06-2016
    Location
    Cluj, Romania
    MS-Off Ver
    2007-2010
    Posts
    220

    Re: Auto sort and remove blank cells

    Try this array formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-29-2012
    Location
    australia
    MS-Off Ver
    Excel 2007
    Posts
    86

    Re: Auto sort and remove blank cells

    thanks everyone, works great

+ 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: 9
    Last Post: 11-23-2016, 12:22 PM
  2. Auto sort when when cell is not blank
    By cyee in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-18-2015, 02:07 AM
  3. [SOLVED] MultiLine Textbox to auto remove blank line, count line, remove duplicate
    By khhoa in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-24-2015, 09:28 PM
  4. VBA in change event format to auto remove rows having zero value and auto sort
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-06-2013, 09:18 AM
  5. Replies: 5
    Last Post: 08-26-2013, 06:26 PM
  6. Sort - Merge Current Data into blank cells, remove duplicate information
    By cannedyams in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-27-2012, 04:08 PM
  7. Remove Duplicates from 2 columns then auto sort
    By Dsnellin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2011, 03:09 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