Results 1 to 4 of 4

FILTER Function to Extract Data

Threaded View

  1. #1
    Forum Contributor
    Join Date
    02-08-2005
    MS-Off Ver
    Microsoft 365
    Posts
    841

    FILTER Function to Extract Data

    Hi,

    In the source_data sheet I have sample sales and profit growth (%) data at the report date and at a previous period (t-1) over 1 year and 3 years.

    In the summary_data sheet I would like to extract from the source_data sheet the Product Code, Product Name, Country, Sales and Growth numbers for products in which the previous growth value was negative and the current value was positive for each period (1 year and 3 years), or vice-versa.

    For example, Product AAA had previous growth of 2.00% and current growth of -1.00% over 1 year. EEE had previous growth of -1.00% and current growth of 2.00% over 3 years. Both of these products are therefore included in the summary_data sheet.

    Someone kindly suggested using the FILTER function:

    =FILTER(IF(LEFT(A1:K1)="1",IF((source_data!F2:F16=2),source_data!A2:K16,""),IF(LEFT(A1:K1)="3",IF(source_data!K2:K16=2,source_data!A2:K16,""),source_data!A2:K16)),(source_data!F2:F16=2)+(source_data!K2:K16=2))

    This formula gets that result that I expected with the sample data but doesn't seem to work if, for example, I change the the value in F2 from 2 to 3: using the criteria mentioned above, Product AAA should still be included in the results because 1 year growth at t-1 was positive and that at t was negative.

    The FILTER() seems to be an elegant solution so could someone please suggest any amendment to make it work as expected?

    Thanks!
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Extract or filter Data
    By Cathrine Paul in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 10-01-2021, 11:37 AM
  2. [SOLVED] Excel Function to filter and extract data
    By lumk in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-01-2020, 10:07 PM
  3. [SOLVED] VBA to Extract Data using advanced Filter
    By Howardc1001 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-26-2019, 10:01 AM
  4. Extract or filter Data
    By Cathrine Paul in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-25-2019, 06:22 AM
  5. Replies: 1
    Last Post: 06-09-2016, 12:12 PM
  6. Replies: 2
    Last Post: 10-19-2014, 08:59 AM
  7. Extract all data to new workbook then filter and extract to new worksheets
    By graphicgoose in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-04-2014, 08:18 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