+ Reply to Thread
Results 1 to 6 of 6

Identify a range based on adjacent column....

  1. #1
    Registered User
    Join Date
    01-10-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    6

    Identify a range based on adjacent column....

    Hello,

    I have a column of times people used a door (per day), and a column saying who it was each time, I want a way to take the greatest of these values and subtract the lowest of these values for each person, to find the total time in between. So I used this formula :

    Max(range)-Min(range)

    The problem is that these ranges vary in size, so I can't just choose the ranges myself because there are too many people. I want a way to identify all times associated to one name, and then take the max - the min, in other words, find the range based on an output column with each unique name.

    here's what i have to work with:
    xl example.png

    Thanks for your help.


    edit: you can ignore column I that was my failed earlier attempt.
    Last edited by Alex_Sal; 01-23-2013 at 01:15 PM. Reason: additional info

  2. #2
    Registered User
    Join Date
    01-22-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Identify a range based on adjacent column....

    Hi,
    i have a similar problem and found following solution :
    MAX(INDEX((Sheet2!C3:C997=C1)*D3:D997;0))
    In words : Find the Max of those entries (Range D3-D997), where the cellvalue in the C column = C1.

    What Idont know - what the "*" operator is - in other words, why it works. Anybody around here know this ?
    Update 1: Sample File selectionsample.xls

    Update 2: "Why does it work" - it seems to be a matrix/array operation. With my office, I can just enter it. Others post, that you need to leave the "celleditor" with STRG-SHIFT-ENTER to enable this.

    Update 3: Details for the "*" operator can be found here - "*" is the AND-Operator for array-operations. Those operators are needed because following is illegal
    =MIN(IF(AND(A1:A10=”value1″,B1:B10=”value2″),C1:C10))



    Josh
    Last edited by josch; 01-25-2013 at 09:29 AM. Reason: Updates to solution

  3. #3
    Registered User
    Join Date
    01-10-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Identify a range based on adjacent column....

    Hi, thanks for the reply.

    I thought the * just means multiply? In any case this formula doesn't work for me it says there's an error, i think because there is no row reference given to the index function. I have tried various alterations but nothing seems to help.

    I'm sure this should be simple...

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Identify a range based on adjacent column....

    Array formula requires CTRL+SHIFT+ENTER

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    adjust the formula to your range


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  5. #5
    Registered User
    Join Date
    01-10-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Identify a range based on adjacent column....

    thanks this is very interesting, what do you mean adjust the formula for my range - change just the ranges - or something else as well? As it stands it's still not finding the right results.

    To clarify my problem, if you look at the example i loaded earlier you'l see the value 8:09 in ColJ adjacent to my own name (Ignore ColI), this is the correct number (16:59 - 08:49), but it was found by me manually selecting the range for the max-min value. I need a way for excel to figure out that range, based on the values in ColH drawing from the information in A and B.

    All ideas appreciated, in the meantime I'm going to play around with If's and Or's

  6. #6
    Registered User
    Join Date
    01-22-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Identify a range based on adjacent column....

    Hi,
    here is a selectionsample.xls samplesheet for the formular. Works just fine for me.

    Josh

+ 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