+ Reply to Thread
Results 1 to 11 of 11

Pulling off a specific value from a table

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    02-24-2010
    Location
    BC, Canada
    MS-Off Ver
    Excel 2010
    Posts
    174

    Re: Pulling off a specific value from a table

    It would seem that a sumproduct would work if the "C" was replaced by a formula that found the column that has the values of C2 and D2, in rows 5 and 6 respectively. It may need the ADDRESS function to do that, but I can't make it work. It would be something like:

    =SUMPRODUCT(($A$7:$A$26=A2)*($B$7:$B$26=B2)*(address(7,[insert formula]):address(26:[insert formula])))

    If someone can make a formula that figures out the column that matches cell C2 and D2 in his example, then inserting it into the above formula should work.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Pulling off a specific value from a table

    It would be better practice to have year as a separate column. The number of entries would double, and the columns would be reduced by two. Then the formulas are simple, or you could use a pivot table. That's the way Excel was designed to work.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Valued Forum Contributor JeanRage's Avatar
    Join Date
    03-02-2009
    Location
    Nice, France
    MS-Off Ver
    Excel 2003
    Posts
    705

    Re: Pulling off a specific value from a table

    As shg points out, it is not because what you are asking for is feasible ...that it should be done ...
    Revisitng the structure of your database makes a lot more sense ...and the pivot table will give you some much more flexibility ...

  4. #4
    Forum Contributor
    Join Date
    02-24-2010
    Location
    BC, Canada
    MS-Off Ver
    Excel 2010
    Posts
    174

    Re: Pulling off a specific value from a table

    Quote Originally Posted by shg View Post
    It would be better practice to have year as a separate column. The number of entries would double, and the columns would be reduced by two. Then the formulas are simple, or you could use a pivot table. That's the way Excel was designed to work.
    Although it's not my spreadsheet, I just want to know what you mean. There are 2 columns for each year, one with amount and one with the No. What do you mean by creating a separate column for the year? What data would that column contain? Or do you mean another sheet below it? I'm just not sure what you are suggesting.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Pulling off a specific value from a table

    The year column would contain either 2009 or 2010, in the case of the data you have.

    A database in Excel has one record per row and no blanks.

  6. #6
    Forum Contributor
    Join Date
    02-24-2010
    Location
    BC, Canada
    MS-Off Ver
    Excel 2010
    Posts
    174

    Re: Pulling off a specific value from a table

    Quote Originally Posted by shg View Post
    The year column would contain either 2009 or 2010, in the case of the data you have.

    A database in Excel has one record per row and no blanks.
    Ah, for some reason I was having a mental block and thinking that you were saying a column titled "2009" or "2010" and not "Year". One of those days I guess.

+ 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