SUM of INDEX lookups

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Here is my syntax for summing looked up fields. What it is doing is looking
up all downtime minutes in the Header sheet for shift 1. But I get #REF as
the answer. Can someone please help? A57 hold 1 for the shift number,
B1:B700 holds the shift number in the data and A:FS is the enitre data set.

=SUM(INDEX(Header!A:FS,MATCH(A57,Header!B1:B700,0)))
 
So, every time a 1 appears in B1:B700 you want to sum everything from column
A to column FS? That means you want to sum the 1s in column B, too?

Doesn't sound reasonable. How about a clearer explanation of what you want
to accomplish, please?
 
Gotcha. Here is sample data.

Col A Col B Col C Col D Col E
DtHdrDate Shift AvailMin Oper_Breaks Oper_StickerMach
5/5/2006 2 480 0 0
5/5/2006 1 480 24 14
5/4/2006 1 480 24 0
5/4/2006 2 480 12 0
5/3/2006 1 480 20 0
4/28/2006 1 480 20 0
4/28/2006 2 480 20 0
4/27/2006 1 480 20 0
4/27/2006 2 480 20 0
4/26/2006 1 480 20 0

What I am trying to do is a year-to-date sum of each shift for each
category, like Oper_Breaks. I have the data in one sheet and use INDEX/MATCH
to get each date's information, but can't figure out how to get year-to-date
or month-to-date.
 
What do you mean by "What it is doing etc" Have you ever gotten it to work
or did you mean "What I hoped it would do etc"?
Where is the data you want to lookup, in one or multiple columns?

=SUMIF(B1:B700,A57,C1:C700)

if it would be one column in this example column C

=SUMPRODUCT((B1:B700=A57)*(C1:E700))

more than one column, in this example columns C:E

note that the totaled column(s) need to be numeric for the last formula, if
there are text values as well it will return an error. If you have numbers
in All columns from C to FS you should rethink the design



--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top