+ Reply to Thread
Results 1 to 5 of 5

Lookup with multiple conditions

  1. #1
    linglc
    Guest

    Lookup with multiple conditions

    I have a list of dates which i want to look up but with multiple conditions. Eg

    In Sheet 1 and cell A1, I have 8-Jun-2005. In cell B1, I want to return the
    value 17-Jun-2005 because the date falls between 1-Jun-2005 and 30-Jun-2005.
    What is the formula for this?

    From To Reference
    1-Jan-2005 31-Jan-2005 16-Jan-2005
    1-Feb-2005 25-Feb-2005 18-Feb-2005
    1-Mar-2005 31-Mar-2005 12-Mar-2005
    1-Apr-2005 30-Apr-2005 20-Apr-2005
    1-May-2005 31-May-2005 11-May-2005
    1-Jun-2005 30-Jun-2005 17-Jun-2005
    1-Jul-2005 31-Jul-2005 13-Jul-2005
    1-Aug-2005 31-Aug-2005 13-Aug-2005
    1-Sep-2005 30-Sep-2005 11-Sep-2005
    1-Oct-2005 31-Oct-2005 10-Oct-2005

    --
    help needed

  2. #2
    N Harkawat
    Guest

    Re: Lookup with multiple conditions

    =INDEX(Sheet2!$C$1:$C$10,MATCH(1,(--Sheet2!$A$1:$A$10<=A1)*(--Sheet2!$B$1:$B$10>=A1),0))
    array entered (ctrl+shift+enter)
    assuming that the sourrce table is in sheet 2 between ranges A1:a10

    "linglc" <linglc@discussions.microsoft.com> wrote in message
    news:21F762F7-11AB-4404-A703-4F55924DC1EF@microsoft.com...
    >I have a list of dates which i want to look up but with multiple
    >conditions. Eg
    >
    > In Sheet 1 and cell A1, I have 8-Jun-2005. In cell B1, I want to return
    > the
    > value 17-Jun-2005 because the date falls between 1-Jun-2005 and
    > 30-Jun-2005.
    > What is the formula for this?
    >
    > From To Reference
    > 1-Jan-2005 31-Jan-2005 16-Jan-2005
    > 1-Feb-2005 25-Feb-2005 18-Feb-2005
    > 1-Mar-2005 31-Mar-2005 12-Mar-2005
    > 1-Apr-2005 30-Apr-2005 20-Apr-2005
    > 1-May-2005 31-May-2005 11-May-2005
    > 1-Jun-2005 30-Jun-2005 17-Jun-2005
    > 1-Jul-2005 31-Jul-2005 13-Jul-2005
    > 1-Aug-2005 31-Aug-2005 13-Aug-2005
    > 1-Sep-2005 30-Sep-2005 11-Sep-2005
    > 1-Oct-2005 31-Oct-2005 10-Oct-2005
    >
    > --
    > help needed




  3. #3
    Marcus Langell
    Guest

    RE: Lookup with multiple conditions

    In B1, enter =OFFSET(C3,MATCH(A1,A4:A13),0)
    (Based on that you have the cell containing "From" at adress A3)

    /Marcus

    "linglc" wrote:

    > I have a list of dates which i want to look up but with multiple conditions. Eg
    >
    > In Sheet 1 and cell A1, I have 8-Jun-2005. In cell B1, I want to return the
    > value 17-Jun-2005 because the date falls between 1-Jun-2005 and 30-Jun-2005.
    > What is the formula for this?
    >
    > From To Reference
    > 1-Jan-2005 31-Jan-2005 16-Jan-2005
    > 1-Feb-2005 25-Feb-2005 18-Feb-2005
    > 1-Mar-2005 31-Mar-2005 12-Mar-2005
    > 1-Apr-2005 30-Apr-2005 20-Apr-2005
    > 1-May-2005 31-May-2005 11-May-2005
    > 1-Jun-2005 30-Jun-2005 17-Jun-2005
    > 1-Jul-2005 31-Jul-2005 13-Jul-2005
    > 1-Aug-2005 31-Aug-2005 13-Aug-2005
    > 1-Sep-2005 30-Sep-2005 11-Sep-2005
    > 1-Oct-2005 31-Oct-2005 10-Oct-2005
    >
    > --
    > help needed


  4. #4
    linglc
    Guest

    RE: Lookup with multiple conditions

    thanks a mil! it works.
    --
    help needed


    "Marcus Langell" wrote:

    > In B1, enter =OFFSET(C3,MATCH(A1,A4:A13),0)
    > (Based on that you have the cell containing "From" at adress A3)
    >
    > /Marcus
    >
    > "linglc" wrote:
    >
    > > I have a list of dates which i want to look up but with multiple conditions. Eg
    > >
    > > In Sheet 1 and cell A1, I have 8-Jun-2005. In cell B1, I want to return the
    > > value 17-Jun-2005 because the date falls between 1-Jun-2005 and 30-Jun-2005.
    > > What is the formula for this?
    > >
    > > From To Reference
    > > 1-Jan-2005 31-Jan-2005 16-Jan-2005
    > > 1-Feb-2005 25-Feb-2005 18-Feb-2005
    > > 1-Mar-2005 31-Mar-2005 12-Mar-2005
    > > 1-Apr-2005 30-Apr-2005 20-Apr-2005
    > > 1-May-2005 31-May-2005 11-May-2005
    > > 1-Jun-2005 30-Jun-2005 17-Jun-2005
    > > 1-Jul-2005 31-Jul-2005 13-Jul-2005
    > > 1-Aug-2005 31-Aug-2005 13-Aug-2005
    > > 1-Sep-2005 30-Sep-2005 11-Sep-2005
    > > 1-Oct-2005 31-Oct-2005 10-Oct-2005
    > >
    > > --
    > > help needed


  5. #5
    linglc
    Guest

    Re: Lookup with multiple conditions

    this formula works as well
    --
    help needed


    "N Harkawat" wrote:

    > =INDEX(Sheet2!$C$1:$C$10,MATCH(1,(--Sheet2!$A$1:$A$10<=A1)*(--Sheet2!$B$1:$B$10>=A1),0))
    > array entered (ctrl+shift+enter)
    > assuming that the sourrce table is in sheet 2 between ranges A1:a10
    >
    > "linglc" <linglc@discussions.microsoft.com> wrote in message
    > news:21F762F7-11AB-4404-A703-4F55924DC1EF@microsoft.com...
    > >I have a list of dates which i want to look up but with multiple
    > >conditions. Eg
    > >
    > > In Sheet 1 and cell A1, I have 8-Jun-2005. In cell B1, I want to return
    > > the
    > > value 17-Jun-2005 because the date falls between 1-Jun-2005 and
    > > 30-Jun-2005.
    > > What is the formula for this?
    > >
    > > From To Reference
    > > 1-Jan-2005 31-Jan-2005 16-Jan-2005
    > > 1-Feb-2005 25-Feb-2005 18-Feb-2005
    > > 1-Mar-2005 31-Mar-2005 12-Mar-2005
    > > 1-Apr-2005 30-Apr-2005 20-Apr-2005
    > > 1-May-2005 31-May-2005 11-May-2005
    > > 1-Jun-2005 30-Jun-2005 17-Jun-2005
    > > 1-Jul-2005 31-Jul-2005 13-Jul-2005
    > > 1-Aug-2005 31-Aug-2005 13-Aug-2005
    > > 1-Sep-2005 30-Sep-2005 11-Sep-2005
    > > 1-Oct-2005 31-Oct-2005 10-Oct-2005
    > >
    > > --
    > > help needed

    >
    >
    >


+ 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