D
David Heppell
Hello,
I have a table that is 20 rows deep and 53 columns wide (one for each week
of the year + heading)
One of these rows specifies a person in the heading and how many hours they
have worked each week.
I have many hundreds of these tables on a worksheet and for each table I
want to pick out the row that specifies the person and
sum all hours worked by a particular grade of person that week to plot in a
graph.
Each person's grade is specified by another table(called person_vs_grade).
I have set up a table of number of hours worked by grade of person per week.
For each cell in this table I have tried to write a function that gives the
number of hours worked by that grade in the week.
the following tries to conditionally sum for grade 2
first we make sure that we only check the rows where the person's name and
their hours are (Column A is the heading column which contains the name of
the person)
summed, this is done by only summing the rows where the name lookup returns
a value.
if this is true we check that the grade of the person is equal to 2 and then
sum the appropriate column B represents week 1)
{SUM (IF (ISERROR (VLOOKUP($A$1:$A$1000, person_vs_grade, 2, FALSE)),
0, IF (VLOOKUP ($A$1:$A$1000,person_vs_grade,2,FALSE) =2,
B$1:B$1000)))}
this does not work, I am doing something really stupid,
thanks in advance for any help Dave
I have a table that is 20 rows deep and 53 columns wide (one for each week
of the year + heading)
One of these rows specifies a person in the heading and how many hours they
have worked each week.
I have many hundreds of these tables on a worksheet and for each table I
want to pick out the row that specifies the person and
sum all hours worked by a particular grade of person that week to plot in a
graph.
Each person's grade is specified by another table(called person_vs_grade).
I have set up a table of number of hours worked by grade of person per week.
For each cell in this table I have tried to write a function that gives the
number of hours worked by that grade in the week.
the following tries to conditionally sum for grade 2
first we make sure that we only check the rows where the person's name and
their hours are (Column A is the heading column which contains the name of
the person)
summed, this is done by only summing the rows where the name lookup returns
a value.
if this is true we check that the grade of the person is equal to 2 and then
sum the appropriate column B represents week 1)
{SUM (IF (ISERROR (VLOOKUP($A$1:$A$1000, person_vs_grade, 2, FALSE)),
0, IF (VLOOKUP ($A$1:$A$1000,person_vs_grade,2,FALSE) =2,
B$1:B$1000)))}
this does not work, I am doing something really stupid,
thanks in advance for any help Dave