+ Reply to Thread
Results 1 to 4 of 4

Sumproduct or Match & Index?

  1. #1
    Registered User
    Join Date
    06-22-2009
    Location
    Lincoln
    MS-Off Ver
    Excel 2003
    Posts
    68

    Sumproduct or Match & Index?

    Don't know what's happened, but all my Excel knowledge has melted out of my ears.

    I have a sheet (sheet 3) that is a calendar of sorts and looks like this:

    Please Login or Register  to view this content.
    On another sheet (sheet 1) I have a dump of information from a database that is a jumbled mess of data. Down column A are listed the office names, and columns B through to U contain information about each office. The problem is that the way the database has been setup to dump information into the CSV file, I end up with something that looks a little like this:

    Please Login or Register  to view this content.
    Which isn't helpful.

    The Letters at the end are days of the week on which the office is closed. They only appear on the first row of each office data set.

    What I need to do is enter a formula on my calendar sheet (sheet 3) that looks up the office name in column A, checks it against the range of data on sheet 1 and enters "Closed" in the cell if any of the days are listed. So for the data above, it would look a little like this:

    Please Login or Register  to view this content.

    I know I'm probably being incredibly dense and it's a sumproduct deal as my previous query was, but I can't make it work this time around.

    Any ideas?
    Last edited by jennyaccord; 12-19-2011 at 06:41 AM.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Sumproduct or Match & Index?

    jennyaccord,

    Attached is an example workbook based on the criteria described. In Sheet3 cell B2 is this formula:
    =IF(COUNTIF(INDIRECT("Sheet1!"&MATCH($A3,Sheet1!$A:$A,0)&":"&MATCH($A3,Sheet1!$A:$A,0)),B$1)>0,"Closed","")

    And then its copied over and down. Is something like that what you're looking for?
    Attached Files Attached Files
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Sumproduct or Match & Index?

    Try this in Sheet3!B3, copy down & across.

    =IF(ISNUMBER(MATCH(B$1,INDEX(Sheet1!$B:$U,MATCH($A3,Sheet1!$A:$A,0),0),0)),"Closed","")

    If you can attach a dummy file would helpful to see your layout.
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  4. #4
    Registered User
    Join Date
    06-22-2009
    Location
    Lincoln
    MS-Off Ver
    Excel 2003
    Posts
    68

    Re: Sumproduct or Match & Index?

    Thanks guys, both solutions work really well.

    Now all I have to do is remember how to drive Excel (seriously, all my Excel knowledge, gone).

    Thanks again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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