+ Reply to Thread
Results 1 to 6 of 6

Find values that match many criteria including several column headers

  1. #1
    Registered User
    Join Date
    09-10-2013
    Location
    Halifax, West Yorkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Find values that match many criteria including several column headers

    The Problem.jpgHello everyone, I have tried applying all of my (admittedly not huge) knowledge in various methods to this problem; including attempting various combinations of array formulas, COUNTIFS, SUMPRODUCT etc.... all to no avail!

    Essentially what I am attempting to do (in a formula at the moment) is as follows:

    1)
    • Find all values vertically from Column F and look at all rows that match (specific location),
    • Look at specific headers horizontally in row 8 (columns Q:IQ) with the text OSA only (multiple will apply),
    • Then in ALL the columns that meet the header criteria, and match have a match in column F, count the number of values that fall between two dates (i.e. >= Today - five years AND <= Today)

    2)
    • I would also like to find the total of items that then fall within the dates above and outside of these dates above (or basically any date) and have either an "m", "p" or "x" but ignore cells that have "N/A" and are blank!


    Then I would like to display them in a separate table.

    I hope this makes sense and that I am not asking too much, please see attached example of my dataset which I hope will help...

    Cheers,

    James

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Find values that match many criteria including several column headers

    Hello James and welcome to the forum.

    Almost without exception we prefer you to upload the actual workbook so that we have something to work with. Pictures are rarely much use in cases like this.
    Before you upload the workbook manually enter the results you wish to see in whatever table or range you want the results so that we know the end goal.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    09-10-2013
    Location
    Halifax, West Yorkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    3
    Quote Originally Posted by Richard Buttrey View Post
    Hello James and welcome to the forum.

    Almost without exception we prefer you to upload the actual workbook so that we have something to work with. Pictures are rarely much use in cases like this.
    Before you upload the workbook manually enter the results you wish to see in whatever table or range you want the results so that we know the end goal.
    Hi Richard,sorry i could not get the attachments option to work before. I have uploaded from my mobile.

    Cheers,

    James
    Attached Files Attached Files

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Find values that match many criteria including several column headers

    Hi,

    I'm struggling to understand the Manchester Results which is the first I looked at. Where do you get 7 for the count of OSA Total Required in Actual column G31

    Similarly with other counts. Please indicate which cells are used to get say the Leeds and Manchester counts.

  5. #5
    Registered User
    Join Date
    09-10-2013
    Location
    Halifax, West Yorkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Find values that match many criteria including several column headers

    Just as an update, I have had a solution for this problem from NBVC over at Ozgrid (I hope it is ok to give credit to someone on another website).

    Anyway, here is the answer that works / provides a solution to this question:

    Try Sumproduct...

    e.g.

    =SUMPRODUCT(($Q$9:$IQ$27>=TODAY()-365*5)*($Q$9:$IQ$27<=TODAY())*($F$9:$F$27=$F32)*($Q$8:$IQ$8="OSA"))

    copied down

    and for the 2nd part...

    =SUMPRODUCT((($Q$9:$IQ$27>=TODAY()-365*5)*($Q$9:$IQ$27<=TODAY())+(ISNUMBER(MATCH($Q$9:$IQ$27,{"m","p","x"},0))))*($F$9:$F$27=$F32)*($Q$8:$IQ$8="OSA"))

    Regards,

    James

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Find values that match many criteria including several column headers

    I think that this minor correction to the second formula given by joelandbelkla will cover all the dates as the requirement was just for a date value without the restriction of going back 5 years. This will give results identical to the example results.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ 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] copy multiple column, including headers, to a new sheet
    By boboivan in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-16-2015, 05:43 AM
  2. Replies: 4
    Last Post: 02-24-2014, 03:49 PM
  3. Replies: 2
    Last Post: 12-30-2013, 08:15 AM
  4. How to lookup values on a table and get column headers for filtered criteria?
    By MichaelGaribaldi in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-19-2013, 03:30 PM
  5. Replies: 1
    Last Post: 07-03-2013, 12:14 AM
  6. Replies: 2
    Last Post: 05-09-2012, 01:30 PM
  7. [SOLVED] Match and Find Matrix Values with Criteria
    By dreicer_Jarr in forum Excel General
    Replies: 6
    Last Post: 04-06-2012, 12:30 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