+ Reply to Thread
Results 1 to 34 of 34

dynamic, double vlookup, match, index, dget?? different workbooks

  1. #1
    Bernie Deitrick
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    Leslie,

    It references C1 on the same sheet as the formula. Make sure that C1 has
    exactly the same value as one of your month name cells: use copy and paste
    values to do that.

    Also, you may have had weird line wraps introduced by your newsreader
    program, so take out any extra line breaks.

    If you can't get it to work, I will send you two workbooks that have a
    working example. Reply privately, and take out the spaces and change the
    dot to . in my email address.

    HTH,
    Bernie
    MS Excel MVP


    "Leslie" <[email protected]> wrote in message
    news:[email protected]...
    > Thanks again very much. Hopefully one last question... In the formula
    > does
    > C1 reference the worksheet in the destination workbook or in the original
    > workbook? The reason I am asking is because I entered the formula in my
    > new
    > worksheet and I am getting an error. It is looking at the Cell C1 in the
    > new
    > worksheet not the original. Thanks again I so much appreciate it as I've
    > been racking my brain for days.
    >
    > "Bernie Deitrick" wrote:
    >
    >> > If the labels are in the first row, instead of A1,
    >> > A2 and A3 don't you mean A1, B1, C1.

    >>
    >> No, not really. Those are the cells that contain the key values that you
    >> want to extract from your database, and are on the same sheet as your
    >> formula. They _could_ be in A1, B1, and C1, so you would change the
    >> formula
    >> to
    >>
    >> =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book
    >> Name.xls]Sheet
    >> name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    >> name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    >>
    >> This part ensures that only the correct company is pulled:
    >>
    >> ('[Book Name.xls]Sheet name'!A1:A1000=A1)
    >>
    >> This part ensure that only the correct FY is pulled
    >>
    >> ('[Book Name.xls]Sheet name'!B1:B1000=B1)
    >>
    >> and this part finds the correct month:
    >>
    >> MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)
    >>
    >> and this part is pulls in the actual data:
    >>
    >> OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book
    >> Name.xls]Sheet
    >> name'!1:1,FALSE)-1))
    >>
    >> It's a complex formula, but you have a complex problem.
    >>
    >> If you don't want to use a formula, you could use a pivot table, but then
    >> you would need to use a database rather than a cross-tab table, which
    >> would
    >> look like:
    >>
    >> Company FY Month Amt.
    >> A FY 2005 Jly. $6,502.20
    >> A FY 2005 Aug. $9,899.43
    >> A FY 2005 Sep. $28,916.10
    >> etc....
    >>
    >> HTH,
    >> Bernie
    >> MS Excel MVP
    >>
    >>
    >> "Leslie" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > Thank you for your reply. If the labels are in the first row, instead
    >> > of
    >> > A1,
    >> > A2 and A3 don't you mean A1, B1, C1. I'm new using these functions so
    >> > any
    >> > further explanation is appreciated. Another question, The reason I
    >> > need
    >> > this
    >> > formula is because I'm creating other workbooks which will each be
    >> > various
    >> > subsets of this worksheet. How does the other worksheet know to pull
    >> > for
    >> > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    >> > can't
    >> > tell from the formula. Thanks again.

    >>
    >>
    >>




  2. #2
    Bernie Deitrick
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    Then it should pickup the value in column G, which is 6 columns from
    A1:A1000 - unless you changed that part of the formula.

    OFFSET('[Book Name.xls]Sheet Name'!$A$1:$A$1000 < If you changed this
    column, you need to change the -1 part.

    Try

    MATCH($C$1,'[Book Name.xls]Sheet Name'!$1:$1,FALSE)-COLUMN(range that you
    changed the first part to)))

    HTH,
    Bernie
    MS Excel MVP


    "Leslie" <[email protected]> wrote in message
    news:[email protected]...
    >I believe 6.
    >
    > "Bernie Deitrick" wrote:
    >
    >> Leslie,
    >>
    >> What does this formula return?
    >>
    >> =MATCH($C$1,'[Book Name.xls]Sheet Name'!$1:$1,FALSE)-1
    >>
    >> HTH,
    >> Bernie
    >> MS Excel MVP
    >>
    >>
    >> "Leslie" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > Dear Bernie:
    >> >
    >> > I have the correct formula but for some reason it is pulling in a
    >> > number
    >> > from the same row but a different month in column K. I have double and
    >> > triple checked my formula. Does it have something to do with the
    >> > OFFSET
    >> > or
    >> > MATCH portion of this formula? I can't figure it out. Does It have
    >> > something to do with the last portion (i.e. !$1:$1,False)-1)) Thank you
    >> > in
    >> > advance.
    >> >
    >> > =SUMPRODUCT(('[Book Name.xls]Sheet Name'!$A$1:$A$1000=$A$2)*('[Book
    >> > Name.xls]Sheet Name'!$B$1:$B$1000=$B$2),OFFSET('[Book Name.xls]Sheet
    >> > Name'!$A$1:$A$1000,0,MATCH($C$1,'[Book Name.xls]Sheet
    >> > Name'!$1:$1,FALSE)-1))
    >> >
    >> >
    >> > "Leslie" wrote:
    >> >
    >> >> Sorry, did you see this part of my earlier question?
    >> >>
    >> >> Another question, The reason I need
    >> >> > this > formula is because I'm creating other workbooks which will
    >> >> > each
    >> >> > be various
    >> >> > subsets of this worksheet. How does the other worksheet know to
    >> >> > pull
    >> >> > for
    >> >> > company A, FY 2004 in July instead of company C, FY 2005 for July?
    >> >> > I
    >> >> > can't tell from the formula
    >> >>
    >> >> "Bernie Deitrick" wrote:
    >> >>
    >> >> > > If the labels are in the first row, instead of A1,
    >> >> > > A2 and A3 don't you mean A1, B1, C1.
    >> >> >
    >> >> > No, not really. Those are the cells that contain the key values
    >> >> > that
    >> >> > you
    >> >> > want to extract from your database, and are on the same sheet as
    >> >> > your
    >> >> > formula. They _could_ be in A1, B1, and C1, so you would change the
    >> >> > formula
    >> >> > to
    >> >> >
    >> >> > =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book
    >> >> > Name.xls]Sheet
    >> >> > name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    >> >> > name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    >> >> >
    >> >> > This part ensures that only the correct company is pulled:
    >> >> >
    >> >> > ('[Book Name.xls]Sheet name'!A1:A1000=A1)
    >> >> >
    >> >> > This part ensure that only the correct FY is pulled
    >> >> >
    >> >> > ('[Book Name.xls]Sheet name'!B1:B1000=B1)
    >> >> >
    >> >> > and this part finds the correct month:
    >> >> >
    >> >> > MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)
    >> >> >
    >> >> > and this part is pulls in the actual data:
    >> >> >
    >> >> > OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book
    >> >> > Name.xls]Sheet
    >> >> > name'!1:1,FALSE)-1))
    >> >> >
    >> >> > It's a complex formula, but you have a complex problem.
    >> >> >
    >> >> > If you don't want to use a formula, you could use a pivot table, but
    >> >> > then
    >> >> > you would need to use a database rather than a cross-tab table,
    >> >> > which
    >> >> > would
    >> >> > look like:
    >> >> >
    >> >> > Company FY Month Amt.
    >> >> > A FY 2005 Jly. $6,502.20
    >> >> > A FY 2005 Aug. $9,899.43
    >> >> > A FY 2005 Sep. $28,916.10
    >> >> > etc....
    >> >> >
    >> >> > HTH,
    >> >> > Bernie
    >> >> > MS Excel MVP
    >> >> >
    >> >> >
    >> >> > "Leslie" <[email protected]> wrote in message
    >> >> > news:[email protected]...
    >> >> > > Thank you for your reply. If the labels are in the first row,
    >> >> > > instead of
    >> >> > > A1,
    >> >> > > A2 and A3 don't you mean A1, B1, C1. I'm new using these
    >> >> > > functions
    >> >> > > so any
    >> >> > > further explanation is appreciated. Another question, The reason
    >> >> > > I
    >> >> > > need
    >> >> > > this
    >> >> > > formula is because I'm creating other workbooks which will each be
    >> >> > > various
    >> >> > > subsets of this worksheet. How does the other worksheet know to
    >> >> > > pull
    >> >> > > for
    >> >> > > company A, FY 2004 in July instead of company C, FY 2005 for July?
    >> >> > > I
    >> >> > > can't
    >> >> > > tell from the formula. Thanks again.
    >> >> >
    >> >> >
    >> >> >

    >>
    >>
    >>




  3. #3
    Leslie
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    I believe 6.

    "Bernie Deitrick" wrote:

    > Leslie,
    >
    > What does this formula return?
    >
    > =MATCH($C$1,'[Book Name.xls]Sheet Name'!$1:$1,FALSE)-1
    >
    > HTH,
    > Bernie
    > MS Excel MVP
    >
    >
    > "Leslie" <[email protected]> wrote in message
    > news:[email protected]...
    > > Dear Bernie:
    > >
    > > I have the correct formula but for some reason it is pulling in a number
    > > from the same row but a different month in column K. I have double and
    > > triple checked my formula. Does it have something to do with the OFFSET
    > > or
    > > MATCH portion of this formula? I can't figure it out. Does It have
    > > something to do with the last portion (i.e. !$1:$1,False)-1)) Thank you in
    > > advance.
    > >
    > > =SUMPRODUCT(('[Book Name.xls]Sheet Name'!$A$1:$A$1000=$A$2)*('[Book
    > > Name.xls]Sheet Name'!$B$1:$B$1000=$B$2),OFFSET('[Book Name.xls]Sheet
    > > Name'!$A$1:$A$1000,0,MATCH($C$1,'[Book Name.xls]Sheet
    > > Name'!$1:$1,FALSE)-1))
    > >
    > >
    > > "Leslie" wrote:
    > >
    > >> Sorry, did you see this part of my earlier question?
    > >>
    > >> Another question, The reason I need
    > >> > this > formula is because I'm creating other workbooks which will each
    > >> > be various
    > >> > subsets of this worksheet. How does the other worksheet know to pull
    > >> > for
    > >> > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > >> > can't tell from the formula
    > >>
    > >> "Bernie Deitrick" wrote:
    > >>
    > >> > > If the labels are in the first row, instead of A1,
    > >> > > A2 and A3 don't you mean A1, B1, C1.
    > >> >
    > >> > No, not really. Those are the cells that contain the key values that
    > >> > you
    > >> > want to extract from your database, and are on the same sheet as your
    > >> > formula. They _could_ be in A1, B1, and C1, so you would change the
    > >> > formula
    > >> > to
    > >> >
    > >> > =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book
    > >> > Name.xls]Sheet
    > >> > name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    > >> > name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    > >> >
    > >> > This part ensures that only the correct company is pulled:
    > >> >
    > >> > ('[Book Name.xls]Sheet name'!A1:A1000=A1)
    > >> >
    > >> > This part ensure that only the correct FY is pulled
    > >> >
    > >> > ('[Book Name.xls]Sheet name'!B1:B1000=B1)
    > >> >
    > >> > and this part finds the correct month:
    > >> >
    > >> > MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)
    > >> >
    > >> > and this part is pulls in the actual data:
    > >> >
    > >> > OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book
    > >> > Name.xls]Sheet
    > >> > name'!1:1,FALSE)-1))
    > >> >
    > >> > It's a complex formula, but you have a complex problem.
    > >> >
    > >> > If you don't want to use a formula, you could use a pivot table, but
    > >> > then
    > >> > you would need to use a database rather than a cross-tab table, which
    > >> > would
    > >> > look like:
    > >> >
    > >> > Company FY Month Amt.
    > >> > A FY 2005 Jly. $6,502.20
    > >> > A FY 2005 Aug. $9,899.43
    > >> > A FY 2005 Sep. $28,916.10
    > >> > etc....
    > >> >
    > >> > HTH,
    > >> > Bernie
    > >> > MS Excel MVP
    > >> >
    > >> >
    > >> > "Leslie" <[email protected]> wrote in message
    > >> > news:[email protected]...
    > >> > > Thank you for your reply. If the labels are in the first row,
    > >> > > instead of
    > >> > > A1,
    > >> > > A2 and A3 don't you mean A1, B1, C1. I'm new using these functions
    > >> > > so any
    > >> > > further explanation is appreciated. Another question, The reason I
    > >> > > need
    > >> > > this
    > >> > > formula is because I'm creating other workbooks which will each be
    > >> > > various
    > >> > > subsets of this worksheet. How does the other worksheet know to pull
    > >> > > for
    > >> > > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > >> > > can't
    > >> > > tell from the formula. Thanks again.
    > >> >
    > >> >
    > >> >

    >
    >
    >


  4. #4
    Bernie Deitrick
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    Leslie,

    What does this formula return?

    =MATCH($C$1,'[Book Name.xls]Sheet Name'!$1:$1,FALSE)-1

    HTH,
    Bernie
    MS Excel MVP


    "Leslie" <[email protected]> wrote in message
    news:[email protected]...
    > Dear Bernie:
    >
    > I have the correct formula but for some reason it is pulling in a number
    > from the same row but a different month in column K. I have double and
    > triple checked my formula. Does it have something to do with the OFFSET
    > or
    > MATCH portion of this formula? I can't figure it out. Does It have
    > something to do with the last portion (i.e. !$1:$1,False)-1)) Thank you in
    > advance.
    >
    > =SUMPRODUCT(('[Book Name.xls]Sheet Name'!$A$1:$A$1000=$A$2)*('[Book
    > Name.xls]Sheet Name'!$B$1:$B$1000=$B$2),OFFSET('[Book Name.xls]Sheet
    > Name'!$A$1:$A$1000,0,MATCH($C$1,'[Book Name.xls]Sheet
    > Name'!$1:$1,FALSE)-1))
    >
    >
    > "Leslie" wrote:
    >
    >> Sorry, did you see this part of my earlier question?
    >>
    >> Another question, The reason I need
    >> > this > formula is because I'm creating other workbooks which will each
    >> > be various
    >> > subsets of this worksheet. How does the other worksheet know to pull
    >> > for
    >> > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    >> > can't tell from the formula

    >>
    >> "Bernie Deitrick" wrote:
    >>
    >> > > If the labels are in the first row, instead of A1,
    >> > > A2 and A3 don't you mean A1, B1, C1.
    >> >
    >> > No, not really. Those are the cells that contain the key values that
    >> > you
    >> > want to extract from your database, and are on the same sheet as your
    >> > formula. They _could_ be in A1, B1, and C1, so you would change the
    >> > formula
    >> > to
    >> >
    >> > =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book
    >> > Name.xls]Sheet
    >> > name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    >> > name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    >> >
    >> > This part ensures that only the correct company is pulled:
    >> >
    >> > ('[Book Name.xls]Sheet name'!A1:A1000=A1)
    >> >
    >> > This part ensure that only the correct FY is pulled
    >> >
    >> > ('[Book Name.xls]Sheet name'!B1:B1000=B1)
    >> >
    >> > and this part finds the correct month:
    >> >
    >> > MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)
    >> >
    >> > and this part is pulls in the actual data:
    >> >
    >> > OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book
    >> > Name.xls]Sheet
    >> > name'!1:1,FALSE)-1))
    >> >
    >> > It's a complex formula, but you have a complex problem.
    >> >
    >> > If you don't want to use a formula, you could use a pivot table, but
    >> > then
    >> > you would need to use a database rather than a cross-tab table, which
    >> > would
    >> > look like:
    >> >
    >> > Company FY Month Amt.
    >> > A FY 2005 Jly. $6,502.20
    >> > A FY 2005 Aug. $9,899.43
    >> > A FY 2005 Sep. $28,916.10
    >> > etc....
    >> >
    >> > HTH,
    >> > Bernie
    >> > MS Excel MVP
    >> >
    >> >
    >> > "Leslie" <[email protected]> wrote in message
    >> > news:[email protected]...
    >> > > Thank you for your reply. If the labels are in the first row,
    >> > > instead of
    >> > > A1,
    >> > > A2 and A3 don't you mean A1, B1, C1. I'm new using these functions
    >> > > so any
    >> > > further explanation is appreciated. Another question, The reason I
    >> > > need
    >> > > this
    >> > > formula is because I'm creating other workbooks which will each be
    >> > > various
    >> > > subsets of this worksheet. How does the other worksheet know to pull
    >> > > for
    >> > > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    >> > > can't
    >> > > tell from the formula. Thanks again.
    >> >
    >> >
    >> >




  5. #5
    Leslie
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    Dear Bernie:

    I have the correct formula but for some reason it is pulling in a number
    from the same row but a different month in column K. I have double and
    triple checked my formula. Does it have something to do with the OFFSET or
    MATCH portion of this formula? I can’t figure it out. Does It have
    something to do with the last portion (i.e. !$1:$1,False)-1)) Thank you in
    advance.

    =SUMPRODUCT(('[Book Name.xls]Sheet Name'!$A$1:$A$1000=$A$2)*('[Book
    Name.xls]Sheet Name'!$B$1:$B$1000=$B$2),OFFSET('[Book Name.xls]Sheet
    Name'!$A$1:$A$1000,0,MATCH($C$1,'[Book Name.xls]Sheet Name'!$1:$1,FALSE)-1))


    "Leslie" wrote:

    > Sorry, did you see this part of my earlier question?
    >
    > Another question, The reason I need
    > > this > formula is because I'm creating other workbooks which will each be various
    > > subsets of this worksheet. How does the other worksheet know to pull for
    > > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > > can't tell from the formula

    >
    > "Bernie Deitrick" wrote:
    >
    > > > If the labels are in the first row, instead of A1,
    > > > A2 and A3 don't you mean A1, B1, C1.

    > >
    > > No, not really. Those are the cells that contain the key values that you
    > > want to extract from your database, and are on the same sheet as your
    > > formula. They _could_ be in A1, B1, and C1, so you would change the formula
    > > to
    > >
    > > =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book Name.xls]Sheet
    > > name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    > > name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    > >
    > > This part ensures that only the correct company is pulled:
    > >
    > > ('[Book Name.xls]Sheet name'!A1:A1000=A1)
    > >
    > > This part ensure that only the correct FY is pulled
    > >
    > > ('[Book Name.xls]Sheet name'!B1:B1000=B1)
    > >
    > > and this part finds the correct month:
    > >
    > > MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)
    > >
    > > and this part is pulls in the actual data:
    > >
    > > OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet
    > > name'!1:1,FALSE)-1))
    > >
    > > It's a complex formula, but you have a complex problem.
    > >
    > > If you don't want to use a formula, you could use a pivot table, but then
    > > you would need to use a database rather than a cross-tab table, which would
    > > look like:
    > >
    > > Company FY Month Amt.
    > > A FY 2005 Jly. $6,502.20
    > > A FY 2005 Aug. $9,899.43
    > > A FY 2005 Sep. $28,916.10
    > > etc....
    > >
    > > HTH,
    > > Bernie
    > > MS Excel MVP
    > >
    > >
    > > "Leslie" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > Thank you for your reply. If the labels are in the first row, instead of
    > > > A1,
    > > > A2 and A3 don't you mean A1, B1, C1. I'm new using these functions so any
    > > > further explanation is appreciated. Another question, The reason I need
    > > > this
    > > > formula is because I'm creating other workbooks which will each be various
    > > > subsets of this worksheet. How does the other worksheet know to pull for
    > > > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > > > can't
    > > > tell from the formula. Thanks again.

    > >
    > >
    > >


  6. #6
    Leslie
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    I emailed you but you may need to look under Spam because i used a different
    email address.

    "Bernie Deitrick" wrote:

    > Leslie,
    >
    > It references C1 on the same sheet as the formula. Make sure that C1 has
    > exactly the same value as one of your month name cells: use copy and paste
    > values to do that.
    >
    > Also, you may have had weird line wraps introduced by your newsreader
    > program, so take out any extra line breaks.
    >
    > If you can't get it to work, I will send you two workbooks that have a
    > working example. Reply privately, and take out the spaces and change the
    > dot to . in my email address.
    >
    > HTH,
    > Bernie
    > MS Excel MVP
    >
    >
    > "Leslie" <[email protected]> wrote in message
    > news:[email protected]...
    > > Thanks again very much. Hopefully one last question... In the formula
    > > does
    > > C1 reference the worksheet in the destination workbook or in the original
    > > workbook? The reason I am asking is because I entered the formula in my
    > > new
    > > worksheet and I am getting an error. It is looking at the Cell C1 in the
    > > new
    > > worksheet not the original. Thanks again I so much appreciate it as I've
    > > been racking my brain for days.
    > >
    > > "Bernie Deitrick" wrote:
    > >
    > >> > If the labels are in the first row, instead of A1,
    > >> > A2 and A3 don't you mean A1, B1, C1.
    > >>
    > >> No, not really. Those are the cells that contain the key values that you
    > >> want to extract from your database, and are on the same sheet as your
    > >> formula. They _could_ be in A1, B1, and C1, so you would change the
    > >> formula
    > >> to
    > >>
    > >> =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book
    > >> Name.xls]Sheet
    > >> name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    > >> name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    > >>
    > >> This part ensures that only the correct company is pulled:
    > >>
    > >> ('[Book Name.xls]Sheet name'!A1:A1000=A1)
    > >>
    > >> This part ensure that only the correct FY is pulled
    > >>
    > >> ('[Book Name.xls]Sheet name'!B1:B1000=B1)
    > >>
    > >> and this part finds the correct month:
    > >>
    > >> MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)
    > >>
    > >> and this part is pulls in the actual data:
    > >>
    > >> OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book
    > >> Name.xls]Sheet
    > >> name'!1:1,FALSE)-1))
    > >>
    > >> It's a complex formula, but you have a complex problem.
    > >>
    > >> If you don't want to use a formula, you could use a pivot table, but then
    > >> you would need to use a database rather than a cross-tab table, which
    > >> would
    > >> look like:
    > >>
    > >> Company FY Month Amt.
    > >> A FY 2005 Jly. $6,502.20
    > >> A FY 2005 Aug. $9,899.43
    > >> A FY 2005 Sep. $28,916.10
    > >> etc....
    > >>
    > >> HTH,
    > >> Bernie
    > >> MS Excel MVP
    > >>
    > >>
    > >> "Leslie" <[email protected]> wrote in message
    > >> news:[email protected]...
    > >> > Thank you for your reply. If the labels are in the first row, instead
    > >> > of
    > >> > A1,
    > >> > A2 and A3 don't you mean A1, B1, C1. I'm new using these functions so
    > >> > any
    > >> > further explanation is appreciated. Another question, The reason I
    > >> > need
    > >> > this
    > >> > formula is because I'm creating other workbooks which will each be
    > >> > various
    > >> > subsets of this worksheet. How does the other worksheet know to pull
    > >> > for
    > >> > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > >> > can't
    > >> > tell from the formula. Thanks again.
    > >>
    > >>
    > >>

    >
    >
    >


  7. #7
    Leslie
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    Sorry, did you see this part of my earlier question?

    Another question, The reason I need
    > this > formula is because I'm creating other workbooks which will each be various
    > subsets of this worksheet. How does the other worksheet know to pull for
    > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > can't tell from the formula


    "Bernie Deitrick" wrote:

    > > If the labels are in the first row, instead of A1,
    > > A2 and A3 don't you mean A1, B1, C1.

    >
    > No, not really. Those are the cells that contain the key values that you
    > want to extract from your database, and are on the same sheet as your
    > formula. They _could_ be in A1, B1, and C1, so you would change the formula
    > to
    >
    > =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book Name.xls]Sheet
    > name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    > name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    >
    > This part ensures that only the correct company is pulled:
    >
    > ('[Book Name.xls]Sheet name'!A1:A1000=A1)
    >
    > This part ensure that only the correct FY is pulled
    >
    > ('[Book Name.xls]Sheet name'!B1:B1000=B1)
    >
    > and this part finds the correct month:
    >
    > MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)
    >
    > and this part is pulls in the actual data:
    >
    > OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet
    > name'!1:1,FALSE)-1))
    >
    > It's a complex formula, but you have a complex problem.
    >
    > If you don't want to use a formula, you could use a pivot table, but then
    > you would need to use a database rather than a cross-tab table, which would
    > look like:
    >
    > Company FY Month Amt.
    > A FY 2005 Jly. $6,502.20
    > A FY 2005 Aug. $9,899.43
    > A FY 2005 Sep. $28,916.10
    > etc....
    >
    > HTH,
    > Bernie
    > MS Excel MVP
    >
    >
    > "Leslie" <[email protected]> wrote in message
    > news:[email protected]...
    > > Thank you for your reply. If the labels are in the first row, instead of
    > > A1,
    > > A2 and A3 don't you mean A1, B1, C1. I'm new using these functions so any
    > > further explanation is appreciated. Another question, The reason I need
    > > this
    > > formula is because I'm creating other workbooks which will each be various
    > > subsets of this worksheet. How does the other worksheet know to pull for
    > > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > > can't
    > > tell from the formula. Thanks again.

    >
    >
    >


  8. #8
    Leslie
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    Thanks again very much. Hopefully one last question... In the formula does
    C1 reference the worksheet in the destination workbook or in the original
    workbook? The reason I am asking is because I entered the formula in my new
    worksheet and I am getting an error. It is looking at the Cell C1 in the new
    worksheet not the original. Thanks again I so much appreciate it as I've
    been racking my brain for days.

    "Bernie Deitrick" wrote:

    > > If the labels are in the first row, instead of A1,
    > > A2 and A3 don't you mean A1, B1, C1.

    >
    > No, not really. Those are the cells that contain the key values that you
    > want to extract from your database, and are on the same sheet as your
    > formula. They _could_ be in A1, B1, and C1, so you would change the formula
    > to
    >
    > =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book Name.xls]Sheet
    > name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    > name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    >
    > This part ensures that only the correct company is pulled:
    >
    > ('[Book Name.xls]Sheet name'!A1:A1000=A1)
    >
    > This part ensure that only the correct FY is pulled
    >
    > ('[Book Name.xls]Sheet name'!B1:B1000=B1)
    >
    > and this part finds the correct month:
    >
    > MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)
    >
    > and this part is pulls in the actual data:
    >
    > OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet
    > name'!1:1,FALSE)-1))
    >
    > It's a complex formula, but you have a complex problem.
    >
    > If you don't want to use a formula, you could use a pivot table, but then
    > you would need to use a database rather than a cross-tab table, which would
    > look like:
    >
    > Company FY Month Amt.
    > A FY 2005 Jly. $6,502.20
    > A FY 2005 Aug. $9,899.43
    > A FY 2005 Sep. $28,916.10
    > etc....
    >
    > HTH,
    > Bernie
    > MS Excel MVP
    >
    >
    > "Leslie" <[email protected]> wrote in message
    > news:[email protected]...
    > > Thank you for your reply. If the labels are in the first row, instead of
    > > A1,
    > > A2 and A3 don't you mean A1, B1, C1. I'm new using these functions so any
    > > further explanation is appreciated. Another question, The reason I need
    > > this
    > > formula is because I'm creating other workbooks which will each be various
    > > subsets of this worksheet. How does the other worksheet know to pull for
    > > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > > can't
    > > tell from the formula. Thanks again.

    >
    >
    >


  9. #9
    Bernie Deitrick
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    > If the labels are in the first row, instead of A1,
    > A2 and A3 don't you mean A1, B1, C1.


    No, not really. Those are the cells that contain the key values that you
    want to extract from your database, and are on the same sheet as your
    formula. They _could_ be in A1, B1, and C1, so you would change the formula
    to

    =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book Name.xls]Sheet
    name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))

    This part ensures that only the correct company is pulled:

    ('[Book Name.xls]Sheet name'!A1:A1000=A1)

    This part ensure that only the correct FY is pulled

    ('[Book Name.xls]Sheet name'!B1:B1000=B1)

    and this part finds the correct month:

    MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)

    and this part is pulls in the actual data:

    OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet
    name'!1:1,FALSE)-1))

    It's a complex formula, but you have a complex problem.

    If you don't want to use a formula, you could use a pivot table, but then
    you would need to use a database rather than a cross-tab table, which would
    look like:

    Company FY Month Amt.
    A FY 2005 Jly. $6,502.20
    A FY 2005 Aug. $9,899.43
    A FY 2005 Sep. $28,916.10
    etc....

    HTH,
    Bernie
    MS Excel MVP


    "Leslie" <[email protected]> wrote in message
    news:[email protected]...
    > Thank you for your reply. If the labels are in the first row, instead of
    > A1,
    > A2 and A3 don't you mean A1, B1, C1. I'm new using these functions so any
    > further explanation is appreciated. Another question, The reason I need
    > this
    > formula is because I'm creating other workbooks which will each be various
    > subsets of this worksheet. How does the other worksheet know to pull for
    > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > can't
    > tell from the formula. Thanks again.




  10. #10
    Leslie
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    Thank you for your reply. If the labels are in the first row, instead of A1,
    A2 and A3 don't you mean A1, B1, C1. I'm new using these functions so any
    further explanation is appreciated. Another question, The reason I need this
    formula is because I'm creating other workbooks which will each be various
    subsets of this worksheet. How does the other worksheet know to pull for
    company A, FY 2004 in July instead of company C, FY 2005 for July? I can't
    tell from the formula. Thanks again.

    "Bernie Deitrick" wrote:

    > Leslie,
    >
    > Assuming your data table starts in cell A1 of Book Name.xls, sheet "Sheet
    > Name", with labels across the first row. The compay name you want to look
    > up is in cell A1, the FY is in cell A2, and the month is in cell A3. Note
    > that the FY needs to have "FY 2004" not just 2004, to be an exact match of
    > your data. And your month in cell A3 need to be Jly. etc.
    >
    > =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book Name.xls]Sheet
    > name'!B1:B1000=A2),OFFSET('[Book Name.xls]Sheet
    > name'!A1:A1000,0,MATCH(A3,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    >
    > HTH,
    > Bernie
    > MS Excel MVP
    >
    >
    > "Leslie" <[email protected]> wrote in message
    > news:[email protected]...
    > > Below is sample data. I need to be able to lookup a company (company A,

    > for
    > > example) for fiscal year 2004 and in another workbook I want July's figure

    > to
    > > populate the field in the other workbook. The formula also has to take

    > into
    > > account that on this worksheet you see here, I will be inserting and

    > possibly
    > > deleting rows at any time. Therefore, the formula needs to be such that if

    > I
    > > do that, the cell which is populated in the other workbook is still

    > correct.
    > > Thanks for any help.
    > >
    > > Company FY Jly. Aug. Sep.
    > > A FY 2005 $6,502.20 $9,899.43 $28,916.10
    > > A FY 2004 $6,949.45 $4,065.00 $5,285.64
    > > B FY 2005 $8,116.75 $2,195.40 $747.40
    > > B FY 2004 $2,166.40 $3,816.34 $814.34
    > > C FY 2005 $283.00 $195.00 $1,716.40
    > > C FY 2004 $404.20 $2,658.33 $982.40
    > >

    >
    >
    >


  11. #11
    Bernie Deitrick
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbooks

    Leslie,

    Assuming your data table starts in cell A1 of Book Name.xls, sheet "Sheet
    Name", with labels across the first row. The compay name you want to look
    up is in cell A1, the FY is in cell A2, and the month is in cell A3. Note
    that the FY needs to have "FY 2004" not just 2004, to be an exact match of
    your data. And your month in cell A3 need to be Jly. etc.

    =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book Name.xls]Sheet
    name'!B1:B1000=A2),OFFSET('[Book Name.xls]Sheet
    name'!A1:A1000,0,MATCH(A3,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))

    HTH,
    Bernie
    MS Excel MVP


    "Leslie" <[email protected]> wrote in message
    news:[email protected]...
    > Below is sample data. I need to be able to lookup a company (company A,

    for
    > example) for fiscal year 2004 and in another workbook I want July's figure

    to
    > populate the field in the other workbook. The formula also has to take

    into
    > account that on this worksheet you see here, I will be inserting and

    possibly
    > deleting rows at any time. Therefore, the formula needs to be such that if

    I
    > do that, the cell which is populated in the other workbook is still

    correct.
    > Thanks for any help.
    >
    > Company FY Jly. Aug. Sep.
    > A FY 2005 $6,502.20 $9,899.43 $28,916.10
    > A FY 2004 $6,949.45 $4,065.00 $5,285.64
    > B FY 2005 $8,116.75 $2,195.40 $747.40
    > B FY 2004 $2,166.40 $3,816.34 $814.34
    > C FY 2005 $283.00 $195.00 $1,716.40
    > C FY 2004 $404.20 $2,658.33 $982.40
    >




  12. #12
    Leslie
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    Dear Bernie:

    I have the correct formula but for some reason it is pulling in a number
    from the same row but a different month in column K. I have double and
    triple checked my formula. Does it have something to do with the OFFSET or
    MATCH portion of this formula? I can’t figure it out. Does It have
    something to do with the last portion (i.e. !$1:$1,False)-1)) Thank you in
    advance.

    =SUMPRODUCT(('[Book Name.xls]Sheet Name'!$A$1:$A$1000=$A$2)*('[Book
    Name.xls]Sheet Name'!$B$1:$B$1000=$B$2),OFFSET('[Book Name.xls]Sheet
    Name'!$A$1:$A$1000,0,MATCH($C$1,'[Book Name.xls]Sheet Name'!$1:$1,FALSE)-1))


    "Leslie" wrote:

    > Sorry, did you see this part of my earlier question?
    >
    > Another question, The reason I need
    > > this > formula is because I'm creating other workbooks which will each be various
    > > subsets of this worksheet. How does the other worksheet know to pull for
    > > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > > can't tell from the formula

    >
    > "Bernie Deitrick" wrote:
    >
    > > > If the labels are in the first row, instead of A1,
    > > > A2 and A3 don't you mean A1, B1, C1.

    > >
    > > No, not really. Those are the cells that contain the key values that you
    > > want to extract from your database, and are on the same sheet as your
    > > formula. They _could_ be in A1, B1, and C1, so you would change the formula
    > > to
    > >
    > > =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book Name.xls]Sheet
    > > name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    > > name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    > >
    > > This part ensures that only the correct company is pulled:
    > >
    > > ('[Book Name.xls]Sheet name'!A1:A1000=A1)
    > >
    > > This part ensure that only the correct FY is pulled
    > >
    > > ('[Book Name.xls]Sheet name'!B1:B1000=B1)
    > >
    > > and this part finds the correct month:
    > >
    > > MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)
    > >
    > > and this part is pulls in the actual data:
    > >
    > > OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet
    > > name'!1:1,FALSE)-1))
    > >
    > > It's a complex formula, but you have a complex problem.
    > >
    > > If you don't want to use a formula, you could use a pivot table, but then
    > > you would need to use a database rather than a cross-tab table, which would
    > > look like:
    > >
    > > Company FY Month Amt.
    > > A FY 2005 Jly. $6,502.20
    > > A FY 2005 Aug. $9,899.43
    > > A FY 2005 Sep. $28,916.10
    > > etc....
    > >
    > > HTH,
    > > Bernie
    > > MS Excel MVP
    > >
    > >
    > > "Leslie" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > Thank you for your reply. If the labels are in the first row, instead of
    > > > A1,
    > > > A2 and A3 don't you mean A1, B1, C1. I'm new using these functions so any
    > > > further explanation is appreciated. Another question, The reason I need
    > > > this
    > > > formula is because I'm creating other workbooks which will each be various
    > > > subsets of this worksheet. How does the other worksheet know to pull for
    > > > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > > > can't
    > > > tell from the formula. Thanks again.

    > >
    > >
    > >


  13. #13
    Bernie Deitrick
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    Leslie,

    What does this formula return?

    =MATCH($C$1,'[Book Name.xls]Sheet Name'!$1:$1,FALSE)-1

    HTH,
    Bernie
    MS Excel MVP


    "Leslie" <[email protected]> wrote in message
    news:[email protected]...
    > Dear Bernie:
    >
    > I have the correct formula but for some reason it is pulling in a number
    > from the same row but a different month in column K. I have double and
    > triple checked my formula. Does it have something to do with the OFFSET
    > or
    > MATCH portion of this formula? I can't figure it out. Does It have
    > something to do with the last portion (i.e. !$1:$1,False)-1)) Thank you in
    > advance.
    >
    > =SUMPRODUCT(('[Book Name.xls]Sheet Name'!$A$1:$A$1000=$A$2)*('[Book
    > Name.xls]Sheet Name'!$B$1:$B$1000=$B$2),OFFSET('[Book Name.xls]Sheet
    > Name'!$A$1:$A$1000,0,MATCH($C$1,'[Book Name.xls]Sheet
    > Name'!$1:$1,FALSE)-1))
    >
    >
    > "Leslie" wrote:
    >
    >> Sorry, did you see this part of my earlier question?
    >>
    >> Another question, The reason I need
    >> > this > formula is because I'm creating other workbooks which will each
    >> > be various
    >> > subsets of this worksheet. How does the other worksheet know to pull
    >> > for
    >> > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    >> > can't tell from the formula

    >>
    >> "Bernie Deitrick" wrote:
    >>
    >> > > If the labels are in the first row, instead of A1,
    >> > > A2 and A3 don't you mean A1, B1, C1.
    >> >
    >> > No, not really. Those are the cells that contain the key values that
    >> > you
    >> > want to extract from your database, and are on the same sheet as your
    >> > formula. They _could_ be in A1, B1, and C1, so you would change the
    >> > formula
    >> > to
    >> >
    >> > =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book
    >> > Name.xls]Sheet
    >> > name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    >> > name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    >> >
    >> > This part ensures that only the correct company is pulled:
    >> >
    >> > ('[Book Name.xls]Sheet name'!A1:A1000=A1)
    >> >
    >> > This part ensure that only the correct FY is pulled
    >> >
    >> > ('[Book Name.xls]Sheet name'!B1:B1000=B1)
    >> >
    >> > and this part finds the correct month:
    >> >
    >> > MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)
    >> >
    >> > and this part is pulls in the actual data:
    >> >
    >> > OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book
    >> > Name.xls]Sheet
    >> > name'!1:1,FALSE)-1))
    >> >
    >> > It's a complex formula, but you have a complex problem.
    >> >
    >> > If you don't want to use a formula, you could use a pivot table, but
    >> > then
    >> > you would need to use a database rather than a cross-tab table, which
    >> > would
    >> > look like:
    >> >
    >> > Company FY Month Amt.
    >> > A FY 2005 Jly. $6,502.20
    >> > A FY 2005 Aug. $9,899.43
    >> > A FY 2005 Sep. $28,916.10
    >> > etc....
    >> >
    >> > HTH,
    >> > Bernie
    >> > MS Excel MVP
    >> >
    >> >
    >> > "Leslie" <[email protected]> wrote in message
    >> > news:[email protected]...
    >> > > Thank you for your reply. If the labels are in the first row,
    >> > > instead of
    >> > > A1,
    >> > > A2 and A3 don't you mean A1, B1, C1. I'm new using these functions
    >> > > so any
    >> > > further explanation is appreciated. Another question, The reason I
    >> > > need
    >> > > this
    >> > > formula is because I'm creating other workbooks which will each be
    >> > > various
    >> > > subsets of this worksheet. How does the other worksheet know to pull
    >> > > for
    >> > > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    >> > > can't
    >> > > tell from the formula. Thanks again.
    >> >
    >> >
    >> >




  14. #14
    Leslie
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    I emailed you but you may need to look under Spam because i used a different
    email address.

    "Bernie Deitrick" wrote:

    > Leslie,
    >
    > It references C1 on the same sheet as the formula. Make sure that C1 has
    > exactly the same value as one of your month name cells: use copy and paste
    > values to do that.
    >
    > Also, you may have had weird line wraps introduced by your newsreader
    > program, so take out any extra line breaks.
    >
    > If you can't get it to work, I will send you two workbooks that have a
    > working example. Reply privately, and take out the spaces and change the
    > dot to . in my email address.
    >
    > HTH,
    > Bernie
    > MS Excel MVP
    >
    >
    > "Leslie" <[email protected]> wrote in message
    > news:[email protected]...
    > > Thanks again very much. Hopefully one last question... In the formula
    > > does
    > > C1 reference the worksheet in the destination workbook or in the original
    > > workbook? The reason I am asking is because I entered the formula in my
    > > new
    > > worksheet and I am getting an error. It is looking at the Cell C1 in the
    > > new
    > > worksheet not the original. Thanks again I so much appreciate it as I've
    > > been racking my brain for days.
    > >
    > > "Bernie Deitrick" wrote:
    > >
    > >> > If the labels are in the first row, instead of A1,
    > >> > A2 and A3 don't you mean A1, B1, C1.
    > >>
    > >> No, not really. Those are the cells that contain the key values that you
    > >> want to extract from your database, and are on the same sheet as your
    > >> formula. They _could_ be in A1, B1, and C1, so you would change the
    > >> formula
    > >> to
    > >>
    > >> =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book
    > >> Name.xls]Sheet
    > >> name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    > >> name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    > >>
    > >> This part ensures that only the correct company is pulled:
    > >>
    > >> ('[Book Name.xls]Sheet name'!A1:A1000=A1)
    > >>
    > >> This part ensure that only the correct FY is pulled
    > >>
    > >> ('[Book Name.xls]Sheet name'!B1:B1000=B1)
    > >>
    > >> and this part finds the correct month:
    > >>
    > >> MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)
    > >>
    > >> and this part is pulls in the actual data:
    > >>
    > >> OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book
    > >> Name.xls]Sheet
    > >> name'!1:1,FALSE)-1))
    > >>
    > >> It's a complex formula, but you have a complex problem.
    > >>
    > >> If you don't want to use a formula, you could use a pivot table, but then
    > >> you would need to use a database rather than a cross-tab table, which
    > >> would
    > >> look like:
    > >>
    > >> Company FY Month Amt.
    > >> A FY 2005 Jly. $6,502.20
    > >> A FY 2005 Aug. $9,899.43
    > >> A FY 2005 Sep. $28,916.10
    > >> etc....
    > >>
    > >> HTH,
    > >> Bernie
    > >> MS Excel MVP
    > >>
    > >>
    > >> "Leslie" <[email protected]> wrote in message
    > >> news:[email protected]...
    > >> > Thank you for your reply. If the labels are in the first row, instead
    > >> > of
    > >> > A1,
    > >> > A2 and A3 don't you mean A1, B1, C1. I'm new using these functions so
    > >> > any
    > >> > further explanation is appreciated. Another question, The reason I
    > >> > need
    > >> > this
    > >> > formula is because I'm creating other workbooks which will each be
    > >> > various
    > >> > subsets of this worksheet. How does the other worksheet know to pull
    > >> > for
    > >> > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > >> > can't
    > >> > tell from the formula. Thanks again.
    > >>
    > >>
    > >>

    >
    >
    >


  15. #15
    Bernie Deitrick
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    Leslie,

    It references C1 on the same sheet as the formula. Make sure that C1 has
    exactly the same value as one of your month name cells: use copy and paste
    values to do that.

    Also, you may have had weird line wraps introduced by your newsreader
    program, so take out any extra line breaks.

    If you can't get it to work, I will send you two workbooks that have a
    working example. Reply privately, and take out the spaces and change the
    dot to . in my email address.

    HTH,
    Bernie
    MS Excel MVP


    "Leslie" <[email protected]> wrote in message
    news:[email protected]...
    > Thanks again very much. Hopefully one last question... In the formula
    > does
    > C1 reference the worksheet in the destination workbook or in the original
    > workbook? The reason I am asking is because I entered the formula in my
    > new
    > worksheet and I am getting an error. It is looking at the Cell C1 in the
    > new
    > worksheet not the original. Thanks again I so much appreciate it as I've
    > been racking my brain for days.
    >
    > "Bernie Deitrick" wrote:
    >
    >> > If the labels are in the first row, instead of A1,
    >> > A2 and A3 don't you mean A1, B1, C1.

    >>
    >> No, not really. Those are the cells that contain the key values that you
    >> want to extract from your database, and are on the same sheet as your
    >> formula. They _could_ be in A1, B1, and C1, so you would change the
    >> formula
    >> to
    >>
    >> =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book
    >> Name.xls]Sheet
    >> name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    >> name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    >>
    >> This part ensures that only the correct company is pulled:
    >>
    >> ('[Book Name.xls]Sheet name'!A1:A1000=A1)
    >>
    >> This part ensure that only the correct FY is pulled
    >>
    >> ('[Book Name.xls]Sheet name'!B1:B1000=B1)
    >>
    >> and this part finds the correct month:
    >>
    >> MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)
    >>
    >> and this part is pulls in the actual data:
    >>
    >> OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book
    >> Name.xls]Sheet
    >> name'!1:1,FALSE)-1))
    >>
    >> It's a complex formula, but you have a complex problem.
    >>
    >> If you don't want to use a formula, you could use a pivot table, but then
    >> you would need to use a database rather than a cross-tab table, which
    >> would
    >> look like:
    >>
    >> Company FY Month Amt.
    >> A FY 2005 Jly. $6,502.20
    >> A FY 2005 Aug. $9,899.43
    >> A FY 2005 Sep. $28,916.10
    >> etc....
    >>
    >> HTH,
    >> Bernie
    >> MS Excel MVP
    >>
    >>
    >> "Leslie" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > Thank you for your reply. If the labels are in the first row, instead
    >> > of
    >> > A1,
    >> > A2 and A3 don't you mean A1, B1, C1. I'm new using these functions so
    >> > any
    >> > further explanation is appreciated. Another question, The reason I
    >> > need
    >> > this
    >> > formula is because I'm creating other workbooks which will each be
    >> > various
    >> > subsets of this worksheet. How does the other worksheet know to pull
    >> > for
    >> > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    >> > can't
    >> > tell from the formula. Thanks again.

    >>
    >>
    >>




  16. #16
    Leslie
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    Sorry, did you see this part of my earlier question?

    Another question, The reason I need
    > this > formula is because I'm creating other workbooks which will each be various
    > subsets of this worksheet. How does the other worksheet know to pull for
    > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > can't tell from the formula


    "Bernie Deitrick" wrote:

    > > If the labels are in the first row, instead of A1,
    > > A2 and A3 don't you mean A1, B1, C1.

    >
    > No, not really. Those are the cells that contain the key values that you
    > want to extract from your database, and are on the same sheet as your
    > formula. They _could_ be in A1, B1, and C1, so you would change the formula
    > to
    >
    > =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book Name.xls]Sheet
    > name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    > name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    >
    > This part ensures that only the correct company is pulled:
    >
    > ('[Book Name.xls]Sheet name'!A1:A1000=A1)
    >
    > This part ensure that only the correct FY is pulled
    >
    > ('[Book Name.xls]Sheet name'!B1:B1000=B1)
    >
    > and this part finds the correct month:
    >
    > MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)
    >
    > and this part is pulls in the actual data:
    >
    > OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet
    > name'!1:1,FALSE)-1))
    >
    > It's a complex formula, but you have a complex problem.
    >
    > If you don't want to use a formula, you could use a pivot table, but then
    > you would need to use a database rather than a cross-tab table, which would
    > look like:
    >
    > Company FY Month Amt.
    > A FY 2005 Jly. $6,502.20
    > A FY 2005 Aug. $9,899.43
    > A FY 2005 Sep. $28,916.10
    > etc....
    >
    > HTH,
    > Bernie
    > MS Excel MVP
    >
    >
    > "Leslie" <[email protected]> wrote in message
    > news:[email protected]...
    > > Thank you for your reply. If the labels are in the first row, instead of
    > > A1,
    > > A2 and A3 don't you mean A1, B1, C1. I'm new using these functions so any
    > > further explanation is appreciated. Another question, The reason I need
    > > this
    > > formula is because I'm creating other workbooks which will each be various
    > > subsets of this worksheet. How does the other worksheet know to pull for
    > > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > > can't
    > > tell from the formula. Thanks again.

    >
    >
    >


  17. #17
    Leslie
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    Thanks again very much. Hopefully one last question... In the formula does
    C1 reference the worksheet in the destination workbook or in the original
    workbook? The reason I am asking is because I entered the formula in my new
    worksheet and I am getting an error. It is looking at the Cell C1 in the new
    worksheet not the original. Thanks again I so much appreciate it as I've
    been racking my brain for days.

    "Bernie Deitrick" wrote:

    > > If the labels are in the first row, instead of A1,
    > > A2 and A3 don't you mean A1, B1, C1.

    >
    > No, not really. Those are the cells that contain the key values that you
    > want to extract from your database, and are on the same sheet as your
    > formula. They _could_ be in A1, B1, and C1, so you would change the formula
    > to
    >
    > =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book Name.xls]Sheet
    > name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    > name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    >
    > This part ensures that only the correct company is pulled:
    >
    > ('[Book Name.xls]Sheet name'!A1:A1000=A1)
    >
    > This part ensure that only the correct FY is pulled
    >
    > ('[Book Name.xls]Sheet name'!B1:B1000=B1)
    >
    > and this part finds the correct month:
    >
    > MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)
    >
    > and this part is pulls in the actual data:
    >
    > OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet
    > name'!1:1,FALSE)-1))
    >
    > It's a complex formula, but you have a complex problem.
    >
    > If you don't want to use a formula, you could use a pivot table, but then
    > you would need to use a database rather than a cross-tab table, which would
    > look like:
    >
    > Company FY Month Amt.
    > A FY 2005 Jly. $6,502.20
    > A FY 2005 Aug. $9,899.43
    > A FY 2005 Sep. $28,916.10
    > etc....
    >
    > HTH,
    > Bernie
    > MS Excel MVP
    >
    >
    > "Leslie" <[email protected]> wrote in message
    > news:[email protected]...
    > > Thank you for your reply. If the labels are in the first row, instead of
    > > A1,
    > > A2 and A3 don't you mean A1, B1, C1. I'm new using these functions so any
    > > further explanation is appreciated. Another question, The reason I need
    > > this
    > > formula is because I'm creating other workbooks which will each be various
    > > subsets of this worksheet. How does the other worksheet know to pull for
    > > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > > can't
    > > tell from the formula. Thanks again.

    >
    >
    >


  18. #18
    Bernie Deitrick
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    > If the labels are in the first row, instead of A1,
    > A2 and A3 don't you mean A1, B1, C1.


    No, not really. Those are the cells that contain the key values that you
    want to extract from your database, and are on the same sheet as your
    formula. They _could_ be in A1, B1, and C1, so you would change the formula
    to

    =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book Name.xls]Sheet
    name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))

    This part ensures that only the correct company is pulled:

    ('[Book Name.xls]Sheet name'!A1:A1000=A1)

    This part ensure that only the correct FY is pulled

    ('[Book Name.xls]Sheet name'!B1:B1000=B1)

    and this part finds the correct month:

    MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)

    and this part is pulls in the actual data:

    OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet
    name'!1:1,FALSE)-1))

    It's a complex formula, but you have a complex problem.

    If you don't want to use a formula, you could use a pivot table, but then
    you would need to use a database rather than a cross-tab table, which would
    look like:

    Company FY Month Amt.
    A FY 2005 Jly. $6,502.20
    A FY 2005 Aug. $9,899.43
    A FY 2005 Sep. $28,916.10
    etc....

    HTH,
    Bernie
    MS Excel MVP


    "Leslie" <[email protected]> wrote in message
    news:[email protected]...
    > Thank you for your reply. If the labels are in the first row, instead of
    > A1,
    > A2 and A3 don't you mean A1, B1, C1. I'm new using these functions so any
    > further explanation is appreciated. Another question, The reason I need
    > this
    > formula is because I'm creating other workbooks which will each be various
    > subsets of this worksheet. How does the other worksheet know to pull for
    > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > can't
    > tell from the formula. Thanks again.




  19. #19
    Leslie
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    I believe 6.

    "Bernie Deitrick" wrote:

    > Leslie,
    >
    > What does this formula return?
    >
    > =MATCH($C$1,'[Book Name.xls]Sheet Name'!$1:$1,FALSE)-1
    >
    > HTH,
    > Bernie
    > MS Excel MVP
    >
    >
    > "Leslie" <[email protected]> wrote in message
    > news:[email protected]...
    > > Dear Bernie:
    > >
    > > I have the correct formula but for some reason it is pulling in a number
    > > from the same row but a different month in column K. I have double and
    > > triple checked my formula. Does it have something to do with the OFFSET
    > > or
    > > MATCH portion of this formula? I can't figure it out. Does It have
    > > something to do with the last portion (i.e. !$1:$1,False)-1)) Thank you in
    > > advance.
    > >
    > > =SUMPRODUCT(('[Book Name.xls]Sheet Name'!$A$1:$A$1000=$A$2)*('[Book
    > > Name.xls]Sheet Name'!$B$1:$B$1000=$B$2),OFFSET('[Book Name.xls]Sheet
    > > Name'!$A$1:$A$1000,0,MATCH($C$1,'[Book Name.xls]Sheet
    > > Name'!$1:$1,FALSE)-1))
    > >
    > >
    > > "Leslie" wrote:
    > >
    > >> Sorry, did you see this part of my earlier question?
    > >>
    > >> Another question, The reason I need
    > >> > this > formula is because I'm creating other workbooks which will each
    > >> > be various
    > >> > subsets of this worksheet. How does the other worksheet know to pull
    > >> > for
    > >> > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > >> > can't tell from the formula
    > >>
    > >> "Bernie Deitrick" wrote:
    > >>
    > >> > > If the labels are in the first row, instead of A1,
    > >> > > A2 and A3 don't you mean A1, B1, C1.
    > >> >
    > >> > No, not really. Those are the cells that contain the key values that
    > >> > you
    > >> > want to extract from your database, and are on the same sheet as your
    > >> > formula. They _could_ be in A1, B1, and C1, so you would change the
    > >> > formula
    > >> > to
    > >> >
    > >> > =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book
    > >> > Name.xls]Sheet
    > >> > name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    > >> > name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    > >> >
    > >> > This part ensures that only the correct company is pulled:
    > >> >
    > >> > ('[Book Name.xls]Sheet name'!A1:A1000=A1)
    > >> >
    > >> > This part ensure that only the correct FY is pulled
    > >> >
    > >> > ('[Book Name.xls]Sheet name'!B1:B1000=B1)
    > >> >
    > >> > and this part finds the correct month:
    > >> >
    > >> > MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)
    > >> >
    > >> > and this part is pulls in the actual data:
    > >> >
    > >> > OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book
    > >> > Name.xls]Sheet
    > >> > name'!1:1,FALSE)-1))
    > >> >
    > >> > It's a complex formula, but you have a complex problem.
    > >> >
    > >> > If you don't want to use a formula, you could use a pivot table, but
    > >> > then
    > >> > you would need to use a database rather than a cross-tab table, which
    > >> > would
    > >> > look like:
    > >> >
    > >> > Company FY Month Amt.
    > >> > A FY 2005 Jly. $6,502.20
    > >> > A FY 2005 Aug. $9,899.43
    > >> > A FY 2005 Sep. $28,916.10
    > >> > etc....
    > >> >
    > >> > HTH,
    > >> > Bernie
    > >> > MS Excel MVP
    > >> >
    > >> >
    > >> > "Leslie" <[email protected]> wrote in message
    > >> > news:[email protected]...
    > >> > > Thank you for your reply. If the labels are in the first row,
    > >> > > instead of
    > >> > > A1,
    > >> > > A2 and A3 don't you mean A1, B1, C1. I'm new using these functions
    > >> > > so any
    > >> > > further explanation is appreciated. Another question, The reason I
    > >> > > need
    > >> > > this
    > >> > > formula is because I'm creating other workbooks which will each be
    > >> > > various
    > >> > > subsets of this worksheet. How does the other worksheet know to pull
    > >> > > for
    > >> > > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > >> > > can't
    > >> > > tell from the formula. Thanks again.
    > >> >
    > >> >
    > >> >

    >
    >
    >


  20. #20
    Leslie
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    Thank you for your reply. If the labels are in the first row, instead of A1,
    A2 and A3 don't you mean A1, B1, C1. I'm new using these functions so any
    further explanation is appreciated. Another question, The reason I need this
    formula is because I'm creating other workbooks which will each be various
    subsets of this worksheet. How does the other worksheet know to pull for
    company A, FY 2004 in July instead of company C, FY 2005 for July? I can't
    tell from the formula. Thanks again.

    "Bernie Deitrick" wrote:

    > Leslie,
    >
    > Assuming your data table starts in cell A1 of Book Name.xls, sheet "Sheet
    > Name", with labels across the first row. The compay name you want to look
    > up is in cell A1, the FY is in cell A2, and the month is in cell A3. Note
    > that the FY needs to have "FY 2004" not just 2004, to be an exact match of
    > your data. And your month in cell A3 need to be Jly. etc.
    >
    > =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book Name.xls]Sheet
    > name'!B1:B1000=A2),OFFSET('[Book Name.xls]Sheet
    > name'!A1:A1000,0,MATCH(A3,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    >
    > HTH,
    > Bernie
    > MS Excel MVP
    >
    >
    > "Leslie" <[email protected]> wrote in message
    > news:[email protected]...
    > > Below is sample data. I need to be able to lookup a company (company A,

    > for
    > > example) for fiscal year 2004 and in another workbook I want July's figure

    > to
    > > populate the field in the other workbook. The formula also has to take

    > into
    > > account that on this worksheet you see here, I will be inserting and

    > possibly
    > > deleting rows at any time. Therefore, the formula needs to be such that if

    > I
    > > do that, the cell which is populated in the other workbook is still

    > correct.
    > > Thanks for any help.
    > >
    > > Company FY Jly. Aug. Sep.
    > > A FY 2005 $6,502.20 $9,899.43 $28,916.10
    > > A FY 2004 $6,949.45 $4,065.00 $5,285.64
    > > B FY 2005 $8,116.75 $2,195.40 $747.40
    > > B FY 2004 $2,166.40 $3,816.34 $814.34
    > > C FY 2005 $283.00 $195.00 $1,716.40
    > > C FY 2004 $404.20 $2,658.33 $982.40
    > >

    >
    >
    >


  21. #21
    Bernie Deitrick
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbooks

    Leslie,

    Assuming your data table starts in cell A1 of Book Name.xls, sheet "Sheet
    Name", with labels across the first row. The compay name you want to look
    up is in cell A1, the FY is in cell A2, and the month is in cell A3. Note
    that the FY needs to have "FY 2004" not just 2004, to be an exact match of
    your data. And your month in cell A3 need to be Jly. etc.

    =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book Name.xls]Sheet
    name'!B1:B1000=A2),OFFSET('[Book Name.xls]Sheet
    name'!A1:A1000,0,MATCH(A3,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))

    HTH,
    Bernie
    MS Excel MVP


    "Leslie" <[email protected]> wrote in message
    news:[email protected]...
    > Below is sample data. I need to be able to lookup a company (company A,

    for
    > example) for fiscal year 2004 and in another workbook I want July's figure

    to
    > populate the field in the other workbook. The formula also has to take

    into
    > account that on this worksheet you see here, I will be inserting and

    possibly
    > deleting rows at any time. Therefore, the formula needs to be such that if

    I
    > do that, the cell which is populated in the other workbook is still

    correct.
    > Thanks for any help.
    >
    > Company FY Jly. Aug. Sep.
    > A FY 2005 $6,502.20 $9,899.43 $28,916.10
    > A FY 2004 $6,949.45 $4,065.00 $5,285.64
    > B FY 2005 $8,116.75 $2,195.40 $747.40
    > B FY 2004 $2,166.40 $3,816.34 $814.34
    > C FY 2005 $283.00 $195.00 $1,716.40
    > C FY 2004 $404.20 $2,658.33 $982.40
    >




  22. #22
    Bernie Deitrick
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    Then it should pickup the value in column G, which is 6 columns from
    A1:A1000 - unless you changed that part of the formula.

    OFFSET('[Book Name.xls]Sheet Name'!$A$1:$A$1000 < If you changed this
    column, you need to change the -1 part.

    Try

    MATCH($C$1,'[Book Name.xls]Sheet Name'!$1:$1,FALSE)-COLUMN(range that you
    changed the first part to)))

    HTH,
    Bernie
    MS Excel MVP


    "Leslie" <[email protected]> wrote in message
    news:[email protected]...
    >I believe 6.
    >
    > "Bernie Deitrick" wrote:
    >
    >> Leslie,
    >>
    >> What does this formula return?
    >>
    >> =MATCH($C$1,'[Book Name.xls]Sheet Name'!$1:$1,FALSE)-1
    >>
    >> HTH,
    >> Bernie
    >> MS Excel MVP
    >>
    >>
    >> "Leslie" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > Dear Bernie:
    >> >
    >> > I have the correct formula but for some reason it is pulling in a
    >> > number
    >> > from the same row but a different month in column K. I have double and
    >> > triple checked my formula. Does it have something to do with the
    >> > OFFSET
    >> > or
    >> > MATCH portion of this formula? I can't figure it out. Does It have
    >> > something to do with the last portion (i.e. !$1:$1,False)-1)) Thank you
    >> > in
    >> > advance.
    >> >
    >> > =SUMPRODUCT(('[Book Name.xls]Sheet Name'!$A$1:$A$1000=$A$2)*('[Book
    >> > Name.xls]Sheet Name'!$B$1:$B$1000=$B$2),OFFSET('[Book Name.xls]Sheet
    >> > Name'!$A$1:$A$1000,0,MATCH($C$1,'[Book Name.xls]Sheet
    >> > Name'!$1:$1,FALSE)-1))
    >> >
    >> >
    >> > "Leslie" wrote:
    >> >
    >> >> Sorry, did you see this part of my earlier question?
    >> >>
    >> >> Another question, The reason I need
    >> >> > this > formula is because I'm creating other workbooks which will
    >> >> > each
    >> >> > be various
    >> >> > subsets of this worksheet. How does the other worksheet know to
    >> >> > pull
    >> >> > for
    >> >> > company A, FY 2004 in July instead of company C, FY 2005 for July?
    >> >> > I
    >> >> > can't tell from the formula
    >> >>
    >> >> "Bernie Deitrick" wrote:
    >> >>
    >> >> > > If the labels are in the first row, instead of A1,
    >> >> > > A2 and A3 don't you mean A1, B1, C1.
    >> >> >
    >> >> > No, not really. Those are the cells that contain the key values
    >> >> > that
    >> >> > you
    >> >> > want to extract from your database, and are on the same sheet as
    >> >> > your
    >> >> > formula. They _could_ be in A1, B1, and C1, so you would change the
    >> >> > formula
    >> >> > to
    >> >> >
    >> >> > =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book
    >> >> > Name.xls]Sheet
    >> >> > name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    >> >> > name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    >> >> >
    >> >> > This part ensures that only the correct company is pulled:
    >> >> >
    >> >> > ('[Book Name.xls]Sheet name'!A1:A1000=A1)
    >> >> >
    >> >> > This part ensure that only the correct FY is pulled
    >> >> >
    >> >> > ('[Book Name.xls]Sheet name'!B1:B1000=B1)
    >> >> >
    >> >> > and this part finds the correct month:
    >> >> >
    >> >> > MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)
    >> >> >
    >> >> > and this part is pulls in the actual data:
    >> >> >
    >> >> > OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book
    >> >> > Name.xls]Sheet
    >> >> > name'!1:1,FALSE)-1))
    >> >> >
    >> >> > It's a complex formula, but you have a complex problem.
    >> >> >
    >> >> > If you don't want to use a formula, you could use a pivot table, but
    >> >> > then
    >> >> > you would need to use a database rather than a cross-tab table,
    >> >> > which
    >> >> > would
    >> >> > look like:
    >> >> >
    >> >> > Company FY Month Amt.
    >> >> > A FY 2005 Jly. $6,502.20
    >> >> > A FY 2005 Aug. $9,899.43
    >> >> > A FY 2005 Sep. $28,916.10
    >> >> > etc....
    >> >> >
    >> >> > HTH,
    >> >> > Bernie
    >> >> > MS Excel MVP
    >> >> >
    >> >> >
    >> >> > "Leslie" <[email protected]> wrote in message
    >> >> > news:[email protected]...
    >> >> > > Thank you for your reply. If the labels are in the first row,
    >> >> > > instead of
    >> >> > > A1,
    >> >> > > A2 and A3 don't you mean A1, B1, C1. I'm new using these
    >> >> > > functions
    >> >> > > so any
    >> >> > > further explanation is appreciated. Another question, The reason
    >> >> > > I
    >> >> > > need
    >> >> > > this
    >> >> > > formula is because I'm creating other workbooks which will each be
    >> >> > > various
    >> >> > > subsets of this worksheet. How does the other worksheet know to
    >> >> > > pull
    >> >> > > for
    >> >> > > company A, FY 2004 in July instead of company C, FY 2005 for July?
    >> >> > > I
    >> >> > > can't
    >> >> > > tell from the formula. Thanks again.
    >> >> >
    >> >> >
    >> >> >

    >>
    >>
    >>




  23. #23
    Bernie Deitrick
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    Leslie,

    What does this formula return?

    =MATCH($C$1,'[Book Name.xls]Sheet Name'!$1:$1,FALSE)-1

    HTH,
    Bernie
    MS Excel MVP


    "Leslie" <[email protected]> wrote in message
    news:[email protected]...
    > Dear Bernie:
    >
    > I have the correct formula but for some reason it is pulling in a number
    > from the same row but a different month in column K. I have double and
    > triple checked my formula. Does it have something to do with the OFFSET
    > or
    > MATCH portion of this formula? I can't figure it out. Does It have
    > something to do with the last portion (i.e. !$1:$1,False)-1)) Thank you in
    > advance.
    >
    > =SUMPRODUCT(('[Book Name.xls]Sheet Name'!$A$1:$A$1000=$A$2)*('[Book
    > Name.xls]Sheet Name'!$B$1:$B$1000=$B$2),OFFSET('[Book Name.xls]Sheet
    > Name'!$A$1:$A$1000,0,MATCH($C$1,'[Book Name.xls]Sheet
    > Name'!$1:$1,FALSE)-1))
    >
    >
    > "Leslie" wrote:
    >
    >> Sorry, did you see this part of my earlier question?
    >>
    >> Another question, The reason I need
    >> > this > formula is because I'm creating other workbooks which will each
    >> > be various
    >> > subsets of this worksheet. How does the other worksheet know to pull
    >> > for
    >> > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    >> > can't tell from the formula

    >>
    >> "Bernie Deitrick" wrote:
    >>
    >> > > If the labels are in the first row, instead of A1,
    >> > > A2 and A3 don't you mean A1, B1, C1.
    >> >
    >> > No, not really. Those are the cells that contain the key values that
    >> > you
    >> > want to extract from your database, and are on the same sheet as your
    >> > formula. They _could_ be in A1, B1, and C1, so you would change the
    >> > formula
    >> > to
    >> >
    >> > =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book
    >> > Name.xls]Sheet
    >> > name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    >> > name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    >> >
    >> > This part ensures that only the correct company is pulled:
    >> >
    >> > ('[Book Name.xls]Sheet name'!A1:A1000=A1)
    >> >
    >> > This part ensure that only the correct FY is pulled
    >> >
    >> > ('[Book Name.xls]Sheet name'!B1:B1000=B1)
    >> >
    >> > and this part finds the correct month:
    >> >
    >> > MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)
    >> >
    >> > and this part is pulls in the actual data:
    >> >
    >> > OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book
    >> > Name.xls]Sheet
    >> > name'!1:1,FALSE)-1))
    >> >
    >> > It's a complex formula, but you have a complex problem.
    >> >
    >> > If you don't want to use a formula, you could use a pivot table, but
    >> > then
    >> > you would need to use a database rather than a cross-tab table, which
    >> > would
    >> > look like:
    >> >
    >> > Company FY Month Amt.
    >> > A FY 2005 Jly. $6,502.20
    >> > A FY 2005 Aug. $9,899.43
    >> > A FY 2005 Sep. $28,916.10
    >> > etc....
    >> >
    >> > HTH,
    >> > Bernie
    >> > MS Excel MVP
    >> >
    >> >
    >> > "Leslie" <[email protected]> wrote in message
    >> > news:[email protected]...
    >> > > Thank you for your reply. If the labels are in the first row,
    >> > > instead of
    >> > > A1,
    >> > > A2 and A3 don't you mean A1, B1, C1. I'm new using these functions
    >> > > so any
    >> > > further explanation is appreciated. Another question, The reason I
    >> > > need
    >> > > this
    >> > > formula is because I'm creating other workbooks which will each be
    >> > > various
    >> > > subsets of this worksheet. How does the other worksheet know to pull
    >> > > for
    >> > > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    >> > > can't
    >> > > tell from the formula. Thanks again.
    >> >
    >> >
    >> >




  24. #24
    Bernie Deitrick
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    Then it should pickup the value in column G, which is 6 columns from
    A1:A1000 - unless you changed that part of the formula.

    OFFSET('[Book Name.xls]Sheet Name'!$A$1:$A$1000 < If you changed this
    column, you need to change the -1 part.

    Try

    MATCH($C$1,'[Book Name.xls]Sheet Name'!$1:$1,FALSE)-COLUMN(range that you
    changed the first part to)))

    HTH,
    Bernie
    MS Excel MVP


    "Leslie" <[email protected]> wrote in message
    news:[email protected]...
    >I believe 6.
    >
    > "Bernie Deitrick" wrote:
    >
    >> Leslie,
    >>
    >> What does this formula return?
    >>
    >> =MATCH($C$1,'[Book Name.xls]Sheet Name'!$1:$1,FALSE)-1
    >>
    >> HTH,
    >> Bernie
    >> MS Excel MVP
    >>
    >>
    >> "Leslie" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > Dear Bernie:
    >> >
    >> > I have the correct formula but for some reason it is pulling in a
    >> > number
    >> > from the same row but a different month in column K. I have double and
    >> > triple checked my formula. Does it have something to do with the
    >> > OFFSET
    >> > or
    >> > MATCH portion of this formula? I can't figure it out. Does It have
    >> > something to do with the last portion (i.e. !$1:$1,False)-1)) Thank you
    >> > in
    >> > advance.
    >> >
    >> > =SUMPRODUCT(('[Book Name.xls]Sheet Name'!$A$1:$A$1000=$A$2)*('[Book
    >> > Name.xls]Sheet Name'!$B$1:$B$1000=$B$2),OFFSET('[Book Name.xls]Sheet
    >> > Name'!$A$1:$A$1000,0,MATCH($C$1,'[Book Name.xls]Sheet
    >> > Name'!$1:$1,FALSE)-1))
    >> >
    >> >
    >> > "Leslie" wrote:
    >> >
    >> >> Sorry, did you see this part of my earlier question?
    >> >>
    >> >> Another question, The reason I need
    >> >> > this > formula is because I'm creating other workbooks which will
    >> >> > each
    >> >> > be various
    >> >> > subsets of this worksheet. How does the other worksheet know to
    >> >> > pull
    >> >> > for
    >> >> > company A, FY 2004 in July instead of company C, FY 2005 for July?
    >> >> > I
    >> >> > can't tell from the formula
    >> >>
    >> >> "Bernie Deitrick" wrote:
    >> >>
    >> >> > > If the labels are in the first row, instead of A1,
    >> >> > > A2 and A3 don't you mean A1, B1, C1.
    >> >> >
    >> >> > No, not really. Those are the cells that contain the key values
    >> >> > that
    >> >> > you
    >> >> > want to extract from your database, and are on the same sheet as
    >> >> > your
    >> >> > formula. They _could_ be in A1, B1, and C1, so you would change the
    >> >> > formula
    >> >> > to
    >> >> >
    >> >> > =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book
    >> >> > Name.xls]Sheet
    >> >> > name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    >> >> > name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    >> >> >
    >> >> > This part ensures that only the correct company is pulled:
    >> >> >
    >> >> > ('[Book Name.xls]Sheet name'!A1:A1000=A1)
    >> >> >
    >> >> > This part ensure that only the correct FY is pulled
    >> >> >
    >> >> > ('[Book Name.xls]Sheet name'!B1:B1000=B1)
    >> >> >
    >> >> > and this part finds the correct month:
    >> >> >
    >> >> > MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)
    >> >> >
    >> >> > and this part is pulls in the actual data:
    >> >> >
    >> >> > OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book
    >> >> > Name.xls]Sheet
    >> >> > name'!1:1,FALSE)-1))
    >> >> >
    >> >> > It's a complex formula, but you have a complex problem.
    >> >> >
    >> >> > If you don't want to use a formula, you could use a pivot table, but
    >> >> > then
    >> >> > you would need to use a database rather than a cross-tab table,
    >> >> > which
    >> >> > would
    >> >> > look like:
    >> >> >
    >> >> > Company FY Month Amt.
    >> >> > A FY 2005 Jly. $6,502.20
    >> >> > A FY 2005 Aug. $9,899.43
    >> >> > A FY 2005 Sep. $28,916.10
    >> >> > etc....
    >> >> >
    >> >> > HTH,
    >> >> > Bernie
    >> >> > MS Excel MVP
    >> >> >
    >> >> >
    >> >> > "Leslie" <[email protected]> wrote in message
    >> >> > news:[email protected]...
    >> >> > > Thank you for your reply. If the labels are in the first row,
    >> >> > > instead of
    >> >> > > A1,
    >> >> > > A2 and A3 don't you mean A1, B1, C1. I'm new using these
    >> >> > > functions
    >> >> > > so any
    >> >> > > further explanation is appreciated. Another question, The reason
    >> >> > > I
    >> >> > > need
    >> >> > > this
    >> >> > > formula is because I'm creating other workbooks which will each be
    >> >> > > various
    >> >> > > subsets of this worksheet. How does the other worksheet know to
    >> >> > > pull
    >> >> > > for
    >> >> > > company A, FY 2004 in July instead of company C, FY 2005 for July?
    >> >> > > I
    >> >> > > can't
    >> >> > > tell from the formula. Thanks again.
    >> >> >
    >> >> >
    >> >> >

    >>
    >>
    >>




  25. #25
    Leslie
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    I believe 6.

    "Bernie Deitrick" wrote:

    > Leslie,
    >
    > What does this formula return?
    >
    > =MATCH($C$1,'[Book Name.xls]Sheet Name'!$1:$1,FALSE)-1
    >
    > HTH,
    > Bernie
    > MS Excel MVP
    >
    >
    > "Leslie" <[email protected]> wrote in message
    > news:[email protected]...
    > > Dear Bernie:
    > >
    > > I have the correct formula but for some reason it is pulling in a number
    > > from the same row but a different month in column K. I have double and
    > > triple checked my formula. Does it have something to do with the OFFSET
    > > or
    > > MATCH portion of this formula? I can't figure it out. Does It have
    > > something to do with the last portion (i.e. !$1:$1,False)-1)) Thank you in
    > > advance.
    > >
    > > =SUMPRODUCT(('[Book Name.xls]Sheet Name'!$A$1:$A$1000=$A$2)*('[Book
    > > Name.xls]Sheet Name'!$B$1:$B$1000=$B$2),OFFSET('[Book Name.xls]Sheet
    > > Name'!$A$1:$A$1000,0,MATCH($C$1,'[Book Name.xls]Sheet
    > > Name'!$1:$1,FALSE)-1))
    > >
    > >
    > > "Leslie" wrote:
    > >
    > >> Sorry, did you see this part of my earlier question?
    > >>
    > >> Another question, The reason I need
    > >> > this > formula is because I'm creating other workbooks which will each
    > >> > be various
    > >> > subsets of this worksheet. How does the other worksheet know to pull
    > >> > for
    > >> > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > >> > can't tell from the formula
    > >>
    > >> "Bernie Deitrick" wrote:
    > >>
    > >> > > If the labels are in the first row, instead of A1,
    > >> > > A2 and A3 don't you mean A1, B1, C1.
    > >> >
    > >> > No, not really. Those are the cells that contain the key values that
    > >> > you
    > >> > want to extract from your database, and are on the same sheet as your
    > >> > formula. They _could_ be in A1, B1, and C1, so you would change the
    > >> > formula
    > >> > to
    > >> >
    > >> > =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book
    > >> > Name.xls]Sheet
    > >> > name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    > >> > name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    > >> >
    > >> > This part ensures that only the correct company is pulled:
    > >> >
    > >> > ('[Book Name.xls]Sheet name'!A1:A1000=A1)
    > >> >
    > >> > This part ensure that only the correct FY is pulled
    > >> >
    > >> > ('[Book Name.xls]Sheet name'!B1:B1000=B1)
    > >> >
    > >> > and this part finds the correct month:
    > >> >
    > >> > MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)
    > >> >
    > >> > and this part is pulls in the actual data:
    > >> >
    > >> > OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book
    > >> > Name.xls]Sheet
    > >> > name'!1:1,FALSE)-1))
    > >> >
    > >> > It's a complex formula, but you have a complex problem.
    > >> >
    > >> > If you don't want to use a formula, you could use a pivot table, but
    > >> > then
    > >> > you would need to use a database rather than a cross-tab table, which
    > >> > would
    > >> > look like:
    > >> >
    > >> > Company FY Month Amt.
    > >> > A FY 2005 Jly. $6,502.20
    > >> > A FY 2005 Aug. $9,899.43
    > >> > A FY 2005 Sep. $28,916.10
    > >> > etc....
    > >> >
    > >> > HTH,
    > >> > Bernie
    > >> > MS Excel MVP
    > >> >
    > >> >
    > >> > "Leslie" <[email protected]> wrote in message
    > >> > news:[email protected]...
    > >> > > Thank you for your reply. If the labels are in the first row,
    > >> > > instead of
    > >> > > A1,
    > >> > > A2 and A3 don't you mean A1, B1, C1. I'm new using these functions
    > >> > > so any
    > >> > > further explanation is appreciated. Another question, The reason I
    > >> > > need
    > >> > > this
    > >> > > formula is because I'm creating other workbooks which will each be
    > >> > > various
    > >> > > subsets of this worksheet. How does the other worksheet know to pull
    > >> > > for
    > >> > > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > >> > > can't
    > >> > > tell from the formula. Thanks again.
    > >> >
    > >> >
    > >> >

    >
    >
    >


  26. #26
    Leslie
    Guest

    dynamic, double vlookup, match, index, dget?? different workbooks

    Below is sample data. I need to be able to lookup a company (company A, for
    example) for fiscal year 2004 and in another workbook I want July's figure to
    populate the field in the other workbook. The formula also has to take into
    account that on this worksheet you see here, I will be inserting and possibly
    deleting rows at any time. Therefore, the formula needs to be such that if I
    do that, the cell which is populated in the other workbook is still correct.
    Thanks for any help.

    Company FY Jly. Aug. Sep.
    A FY 2005 $6,502.20 $9,899.43 $28,916.10
    A FY 2004 $6,949.45 $4,065.00 $5,285.64
    B FY 2005 $8,116.75 $2,195.40 $747.40
    B FY 2004 $2,166.40 $3,816.34 $814.34
    C FY 2005 $283.00 $195.00 $1,716.40
    C FY 2004 $404.20 $2,658.33 $982.40


  27. #27
    Leslie
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    Dear Bernie:

    I have the correct formula but for some reason it is pulling in a number
    from the same row but a different month in column K. I have double and
    triple checked my formula. Does it have something to do with the OFFSET or
    MATCH portion of this formula? I can’t figure it out. Does It have
    something to do with the last portion (i.e. !$1:$1,False)-1)) Thank you in
    advance.

    =SUMPRODUCT(('[Book Name.xls]Sheet Name'!$A$1:$A$1000=$A$2)*('[Book
    Name.xls]Sheet Name'!$B$1:$B$1000=$B$2),OFFSET('[Book Name.xls]Sheet
    Name'!$A$1:$A$1000,0,MATCH($C$1,'[Book Name.xls]Sheet Name'!$1:$1,FALSE)-1))


    "Leslie" wrote:

    > Sorry, did you see this part of my earlier question?
    >
    > Another question, The reason I need
    > > this > formula is because I'm creating other workbooks which will each be various
    > > subsets of this worksheet. How does the other worksheet know to pull for
    > > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > > can't tell from the formula

    >
    > "Bernie Deitrick" wrote:
    >
    > > > If the labels are in the first row, instead of A1,
    > > > A2 and A3 don't you mean A1, B1, C1.

    > >
    > > No, not really. Those are the cells that contain the key values that you
    > > want to extract from your database, and are on the same sheet as your
    > > formula. They _could_ be in A1, B1, and C1, so you would change the formula
    > > to
    > >
    > > =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book Name.xls]Sheet
    > > name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    > > name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    > >
    > > This part ensures that only the correct company is pulled:
    > >
    > > ('[Book Name.xls]Sheet name'!A1:A1000=A1)
    > >
    > > This part ensure that only the correct FY is pulled
    > >
    > > ('[Book Name.xls]Sheet name'!B1:B1000=B1)
    > >
    > > and this part finds the correct month:
    > >
    > > MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)
    > >
    > > and this part is pulls in the actual data:
    > >
    > > OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet
    > > name'!1:1,FALSE)-1))
    > >
    > > It's a complex formula, but you have a complex problem.
    > >
    > > If you don't want to use a formula, you could use a pivot table, but then
    > > you would need to use a database rather than a cross-tab table, which would
    > > look like:
    > >
    > > Company FY Month Amt.
    > > A FY 2005 Jly. $6,502.20
    > > A FY 2005 Aug. $9,899.43
    > > A FY 2005 Sep. $28,916.10
    > > etc....
    > >
    > > HTH,
    > > Bernie
    > > MS Excel MVP
    > >
    > >
    > > "Leslie" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > Thank you for your reply. If the labels are in the first row, instead of
    > > > A1,
    > > > A2 and A3 don't you mean A1, B1, C1. I'm new using these functions so any
    > > > further explanation is appreciated. Another question, The reason I need
    > > > this
    > > > formula is because I'm creating other workbooks which will each be various
    > > > subsets of this worksheet. How does the other worksheet know to pull for
    > > > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > > > can't
    > > > tell from the formula. Thanks again.

    > >
    > >
    > >


  28. #28
    Leslie
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    I emailed you but you may need to look under Spam because i used a different
    email address.

    "Bernie Deitrick" wrote:

    > Leslie,
    >
    > It references C1 on the same sheet as the formula. Make sure that C1 has
    > exactly the same value as one of your month name cells: use copy and paste
    > values to do that.
    >
    > Also, you may have had weird line wraps introduced by your newsreader
    > program, so take out any extra line breaks.
    >
    > If you can't get it to work, I will send you two workbooks that have a
    > working example. Reply privately, and take out the spaces and change the
    > dot to . in my email address.
    >
    > HTH,
    > Bernie
    > MS Excel MVP
    >
    >
    > "Leslie" <[email protected]> wrote in message
    > news:[email protected]...
    > > Thanks again very much. Hopefully one last question... In the formula
    > > does
    > > C1 reference the worksheet in the destination workbook or in the original
    > > workbook? The reason I am asking is because I entered the formula in my
    > > new
    > > worksheet and I am getting an error. It is looking at the Cell C1 in the
    > > new
    > > worksheet not the original. Thanks again I so much appreciate it as I've
    > > been racking my brain for days.
    > >
    > > "Bernie Deitrick" wrote:
    > >
    > >> > If the labels are in the first row, instead of A1,
    > >> > A2 and A3 don't you mean A1, B1, C1.
    > >>
    > >> No, not really. Those are the cells that contain the key values that you
    > >> want to extract from your database, and are on the same sheet as your
    > >> formula. They _could_ be in A1, B1, and C1, so you would change the
    > >> formula
    > >> to
    > >>
    > >> =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book
    > >> Name.xls]Sheet
    > >> name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    > >> name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    > >>
    > >> This part ensures that only the correct company is pulled:
    > >>
    > >> ('[Book Name.xls]Sheet name'!A1:A1000=A1)
    > >>
    > >> This part ensure that only the correct FY is pulled
    > >>
    > >> ('[Book Name.xls]Sheet name'!B1:B1000=B1)
    > >>
    > >> and this part finds the correct month:
    > >>
    > >> MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)
    > >>
    > >> and this part is pulls in the actual data:
    > >>
    > >> OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book
    > >> Name.xls]Sheet
    > >> name'!1:1,FALSE)-1))
    > >>
    > >> It's a complex formula, but you have a complex problem.
    > >>
    > >> If you don't want to use a formula, you could use a pivot table, but then
    > >> you would need to use a database rather than a cross-tab table, which
    > >> would
    > >> look like:
    > >>
    > >> Company FY Month Amt.
    > >> A FY 2005 Jly. $6,502.20
    > >> A FY 2005 Aug. $9,899.43
    > >> A FY 2005 Sep. $28,916.10
    > >> etc....
    > >>
    > >> HTH,
    > >> Bernie
    > >> MS Excel MVP
    > >>
    > >>
    > >> "Leslie" <[email protected]> wrote in message
    > >> news:[email protected]...
    > >> > Thank you for your reply. If the labels are in the first row, instead
    > >> > of
    > >> > A1,
    > >> > A2 and A3 don't you mean A1, B1, C1. I'm new using these functions so
    > >> > any
    > >> > further explanation is appreciated. Another question, The reason I
    > >> > need
    > >> > this
    > >> > formula is because I'm creating other workbooks which will each be
    > >> > various
    > >> > subsets of this worksheet. How does the other worksheet know to pull
    > >> > for
    > >> > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > >> > can't
    > >> > tell from the formula. Thanks again.
    > >>
    > >>
    > >>

    >
    >
    >


  29. #29
    Bernie Deitrick
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    Leslie,

    It references C1 on the same sheet as the formula. Make sure that C1 has
    exactly the same value as one of your month name cells: use copy and paste
    values to do that.

    Also, you may have had weird line wraps introduced by your newsreader
    program, so take out any extra line breaks.

    If you can't get it to work, I will send you two workbooks that have a
    working example. Reply privately, and take out the spaces and change the
    dot to . in my email address.

    HTH,
    Bernie
    MS Excel MVP


    "Leslie" <[email protected]> wrote in message
    news:[email protected]...
    > Thanks again very much. Hopefully one last question... In the formula
    > does
    > C1 reference the worksheet in the destination workbook or in the original
    > workbook? The reason I am asking is because I entered the formula in my
    > new
    > worksheet and I am getting an error. It is looking at the Cell C1 in the
    > new
    > worksheet not the original. Thanks again I so much appreciate it as I've
    > been racking my brain for days.
    >
    > "Bernie Deitrick" wrote:
    >
    >> > If the labels are in the first row, instead of A1,
    >> > A2 and A3 don't you mean A1, B1, C1.

    >>
    >> No, not really. Those are the cells that contain the key values that you
    >> want to extract from your database, and are on the same sheet as your
    >> formula. They _could_ be in A1, B1, and C1, so you would change the
    >> formula
    >> to
    >>
    >> =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book
    >> Name.xls]Sheet
    >> name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    >> name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    >>
    >> This part ensures that only the correct company is pulled:
    >>
    >> ('[Book Name.xls]Sheet name'!A1:A1000=A1)
    >>
    >> This part ensure that only the correct FY is pulled
    >>
    >> ('[Book Name.xls]Sheet name'!B1:B1000=B1)
    >>
    >> and this part finds the correct month:
    >>
    >> MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)
    >>
    >> and this part is pulls in the actual data:
    >>
    >> OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book
    >> Name.xls]Sheet
    >> name'!1:1,FALSE)-1))
    >>
    >> It's a complex formula, but you have a complex problem.
    >>
    >> If you don't want to use a formula, you could use a pivot table, but then
    >> you would need to use a database rather than a cross-tab table, which
    >> would
    >> look like:
    >>
    >> Company FY Month Amt.
    >> A FY 2005 Jly. $6,502.20
    >> A FY 2005 Aug. $9,899.43
    >> A FY 2005 Sep. $28,916.10
    >> etc....
    >>
    >> HTH,
    >> Bernie
    >> MS Excel MVP
    >>
    >>
    >> "Leslie" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > Thank you for your reply. If the labels are in the first row, instead
    >> > of
    >> > A1,
    >> > A2 and A3 don't you mean A1, B1, C1. I'm new using these functions so
    >> > any
    >> > further explanation is appreciated. Another question, The reason I
    >> > need
    >> > this
    >> > formula is because I'm creating other workbooks which will each be
    >> > various
    >> > subsets of this worksheet. How does the other worksheet know to pull
    >> > for
    >> > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    >> > can't
    >> > tell from the formula. Thanks again.

    >>
    >>
    >>




  30. #30
    Leslie
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    Sorry, did you see this part of my earlier question?

    Another question, The reason I need
    > this > formula is because I'm creating other workbooks which will each be various
    > subsets of this worksheet. How does the other worksheet know to pull for
    > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > can't tell from the formula


    "Bernie Deitrick" wrote:

    > > If the labels are in the first row, instead of A1,
    > > A2 and A3 don't you mean A1, B1, C1.

    >
    > No, not really. Those are the cells that contain the key values that you
    > want to extract from your database, and are on the same sheet as your
    > formula. They _could_ be in A1, B1, and C1, so you would change the formula
    > to
    >
    > =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book Name.xls]Sheet
    > name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    > name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    >
    > This part ensures that only the correct company is pulled:
    >
    > ('[Book Name.xls]Sheet name'!A1:A1000=A1)
    >
    > This part ensure that only the correct FY is pulled
    >
    > ('[Book Name.xls]Sheet name'!B1:B1000=B1)
    >
    > and this part finds the correct month:
    >
    > MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)
    >
    > and this part is pulls in the actual data:
    >
    > OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet
    > name'!1:1,FALSE)-1))
    >
    > It's a complex formula, but you have a complex problem.
    >
    > If you don't want to use a formula, you could use a pivot table, but then
    > you would need to use a database rather than a cross-tab table, which would
    > look like:
    >
    > Company FY Month Amt.
    > A FY 2005 Jly. $6,502.20
    > A FY 2005 Aug. $9,899.43
    > A FY 2005 Sep. $28,916.10
    > etc....
    >
    > HTH,
    > Bernie
    > MS Excel MVP
    >
    >
    > "Leslie" <[email protected]> wrote in message
    > news:[email protected]...
    > > Thank you for your reply. If the labels are in the first row, instead of
    > > A1,
    > > A2 and A3 don't you mean A1, B1, C1. I'm new using these functions so any
    > > further explanation is appreciated. Another question, The reason I need
    > > this
    > > formula is because I'm creating other workbooks which will each be various
    > > subsets of this worksheet. How does the other worksheet know to pull for
    > > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > > can't
    > > tell from the formula. Thanks again.

    >
    >
    >


  31. #31
    Leslie
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    Thanks again very much. Hopefully one last question... In the formula does
    C1 reference the worksheet in the destination workbook or in the original
    workbook? The reason I am asking is because I entered the formula in my new
    worksheet and I am getting an error. It is looking at the Cell C1 in the new
    worksheet not the original. Thanks again I so much appreciate it as I've
    been racking my brain for days.

    "Bernie Deitrick" wrote:

    > > If the labels are in the first row, instead of A1,
    > > A2 and A3 don't you mean A1, B1, C1.

    >
    > No, not really. Those are the cells that contain the key values that you
    > want to extract from your database, and are on the same sheet as your
    > formula. They _could_ be in A1, B1, and C1, so you would change the formula
    > to
    >
    > =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book Name.xls]Sheet
    > name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    > name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    >
    > This part ensures that only the correct company is pulled:
    >
    > ('[Book Name.xls]Sheet name'!A1:A1000=A1)
    >
    > This part ensure that only the correct FY is pulled
    >
    > ('[Book Name.xls]Sheet name'!B1:B1000=B1)
    >
    > and this part finds the correct month:
    >
    > MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)
    >
    > and this part is pulls in the actual data:
    >
    > OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet
    > name'!1:1,FALSE)-1))
    >
    > It's a complex formula, but you have a complex problem.
    >
    > If you don't want to use a formula, you could use a pivot table, but then
    > you would need to use a database rather than a cross-tab table, which would
    > look like:
    >
    > Company FY Month Amt.
    > A FY 2005 Jly. $6,502.20
    > A FY 2005 Aug. $9,899.43
    > A FY 2005 Sep. $28,916.10
    > etc....
    >
    > HTH,
    > Bernie
    > MS Excel MVP
    >
    >
    > "Leslie" <[email protected]> wrote in message
    > news:[email protected]...
    > > Thank you for your reply. If the labels are in the first row, instead of
    > > A1,
    > > A2 and A3 don't you mean A1, B1, C1. I'm new using these functions so any
    > > further explanation is appreciated. Another question, The reason I need
    > > this
    > > formula is because I'm creating other workbooks which will each be various
    > > subsets of this worksheet. How does the other worksheet know to pull for
    > > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > > can't
    > > tell from the formula. Thanks again.

    >
    >
    >


  32. #32
    Bernie Deitrick
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    > If the labels are in the first row, instead of A1,
    > A2 and A3 don't you mean A1, B1, C1.


    No, not really. Those are the cells that contain the key values that you
    want to extract from your database, and are on the same sheet as your
    formula. They _could_ be in A1, B1, and C1, so you would change the formula
    to

    =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book Name.xls]Sheet
    name'!B1:B1000=B1),OFFSET('[Book Name.xls]Sheet
    name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))

    This part ensures that only the correct company is pulled:

    ('[Book Name.xls]Sheet name'!A1:A1000=A1)

    This part ensure that only the correct FY is pulled

    ('[Book Name.xls]Sheet name'!B1:B1000=B1)

    and this part finds the correct month:

    MATCH(C1,'[Book Name.xls]Sheet name'!1:1,FALSE)

    and this part is pulls in the actual data:

    OFFSET('[Book Name.xls]Sheet name'!A1:A1000,0,MATCH(C1,'[Book Name.xls]Sheet
    name'!1:1,FALSE)-1))

    It's a complex formula, but you have a complex problem.

    If you don't want to use a formula, you could use a pivot table, but then
    you would need to use a database rather than a cross-tab table, which would
    look like:

    Company FY Month Amt.
    A FY 2005 Jly. $6,502.20
    A FY 2005 Aug. $9,899.43
    A FY 2005 Sep. $28,916.10
    etc....

    HTH,
    Bernie
    MS Excel MVP


    "Leslie" <[email protected]> wrote in message
    news:[email protected]...
    > Thank you for your reply. If the labels are in the first row, instead of
    > A1,
    > A2 and A3 don't you mean A1, B1, C1. I'm new using these functions so any
    > further explanation is appreciated. Another question, The reason I need
    > this
    > formula is because I'm creating other workbooks which will each be various
    > subsets of this worksheet. How does the other worksheet know to pull for
    > company A, FY 2004 in July instead of company C, FY 2005 for July? I
    > can't
    > tell from the formula. Thanks again.




  33. #33
    Leslie
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbo

    Thank you for your reply. If the labels are in the first row, instead of A1,
    A2 and A3 don't you mean A1, B1, C1. I'm new using these functions so any
    further explanation is appreciated. Another question, The reason I need this
    formula is because I'm creating other workbooks which will each be various
    subsets of this worksheet. How does the other worksheet know to pull for
    company A, FY 2004 in July instead of company C, FY 2005 for July? I can't
    tell from the formula. Thanks again.

    "Bernie Deitrick" wrote:

    > Leslie,
    >
    > Assuming your data table starts in cell A1 of Book Name.xls, sheet "Sheet
    > Name", with labels across the first row. The compay name you want to look
    > up is in cell A1, the FY is in cell A2, and the month is in cell A3. Note
    > that the FY needs to have "FY 2004" not just 2004, to be an exact match of
    > your data. And your month in cell A3 need to be Jly. etc.
    >
    > =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book Name.xls]Sheet
    > name'!B1:B1000=A2),OFFSET('[Book Name.xls]Sheet
    > name'!A1:A1000,0,MATCH(A3,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))
    >
    > HTH,
    > Bernie
    > MS Excel MVP
    >
    >
    > "Leslie" <[email protected]> wrote in message
    > news:[email protected]...
    > > Below is sample data. I need to be able to lookup a company (company A,

    > for
    > > example) for fiscal year 2004 and in another workbook I want July's figure

    > to
    > > populate the field in the other workbook. The formula also has to take

    > into
    > > account that on this worksheet you see here, I will be inserting and

    > possibly
    > > deleting rows at any time. Therefore, the formula needs to be such that if

    > I
    > > do that, the cell which is populated in the other workbook is still

    > correct.
    > > Thanks for any help.
    > >
    > > Company FY Jly. Aug. Sep.
    > > A FY 2005 $6,502.20 $9,899.43 $28,916.10
    > > A FY 2004 $6,949.45 $4,065.00 $5,285.64
    > > B FY 2005 $8,116.75 $2,195.40 $747.40
    > > B FY 2004 $2,166.40 $3,816.34 $814.34
    > > C FY 2005 $283.00 $195.00 $1,716.40
    > > C FY 2004 $404.20 $2,658.33 $982.40
    > >

    >
    >
    >


  34. #34
    Bernie Deitrick
    Guest

    Re: dynamic, double vlookup, match, index, dget?? different workbooks

    Leslie,

    Assuming your data table starts in cell A1 of Book Name.xls, sheet "Sheet
    Name", with labels across the first row. The compay name you want to look
    up is in cell A1, the FY is in cell A2, and the month is in cell A3. Note
    that the FY needs to have "FY 2004" not just 2004, to be an exact match of
    your data. And your month in cell A3 need to be Jly. etc.

    =SUMPRODUCT(('[Book Name.xls]Sheet name'!A1:A1000=A1)*('[Book Name.xls]Sheet
    name'!B1:B1000=A2),OFFSET('[Book Name.xls]Sheet
    name'!A1:A1000,0,MATCH(A3,'[Book Name.xls]Sheet name'!1:1,FALSE)-1))

    HTH,
    Bernie
    MS Excel MVP


    "Leslie" <[email protected]> wrote in message
    news:[email protected]...
    > Below is sample data. I need to be able to lookup a company (company A,

    for
    > example) for fiscal year 2004 and in another workbook I want July's figure

    to
    > populate the field in the other workbook. The formula also has to take

    into
    > account that on this worksheet you see here, I will be inserting and

    possibly
    > deleting rows at any time. Therefore, the formula needs to be such that if

    I
    > do that, the cell which is populated in the other workbook is still

    correct.
    > Thanks for any help.
    >
    > Company FY Jly. Aug. Sep.
    > A FY 2005 $6,502.20 $9,899.43 $28,916.10
    > A FY 2004 $6,949.45 $4,065.00 $5,285.64
    > B FY 2005 $8,116.75 $2,195.40 $747.40
    > B FY 2004 $2,166.40 $3,816.34 $814.34
    > C FY 2005 $283.00 $195.00 $1,716.40
    > C FY 2004 $404.20 $2,658.33 $982.40
    >




+ 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