Need this IF function to add if any value that it examines is the

J

jcheko

I set up this if function in a cell and it reads in a worksheet the different
cost codes I input, in all the "12" cells and matched them into another
worksheet were it brings the values that are in the "41" cells....but I can't
figure out how to add the results if in the "12" cells are two or three up to
seven of the cost codes....thanks for the help.


=IF(A4='Foreman''s DTC(1)'!$D$12,'Foreman''s DTC(1)'!$E$41,IF(A4='Foreman''s
DTC(1)'!$F$12,'Foreman''s DTC(1)'!$G$41,IF(A4='Foreman''s
DTC(1)'!$H$12,'Foreman''s DTC(1)'!$I$41,IF(A4='Foreman''s
DTC(1)'!$J$12,'Foreman''s DTC(1)'!$K$41,IF(A4='Foreman''s
DTC(1)'!$L$12,'Foreman''s DTC(1)'!$M$41,IF(A4='Foreman''s
DTC(1)'!$N$12,'Foreman''s DTC(1)'!$O$41,IF(A4='Foreman''s
DTC(1)'!$P$12,'Foreman''s DTC(1)'!$Q$41,"0")))))))
 
T

T. Valko

You might be able to replace that formula with this one:

=IF(COUNTIF('Foreman''s DTC(1)'!D12:p12,A4),INDEX('Foreman''s
DTC(1)'!E41:Q41,MATCH(A4,'Foreman''s DTC(1)'!D12:p12,0)),0)

What's that character after Foreman? I'd definitely get rid of it whatever
it is! In fact, I'd rename the sheet FDTC(1) or even DTC(1) or even DTC1.
can't figure out how to add the results if in the "12"
cells are two or three up to seven of the cost codes

Well, your layout certainly doesn't help matters!

=SUMPRODUCT(--(MOD(COLUMN('Foreman''s
DTC(1)'!D12:p12),2)=0),--(ISNUMBER(MATCH('Foreman''s
DTC(1)'!D12:p12,A4,0))),E41:Q41)
 

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

Top