Problems with an IF statement

A

Amaloney

I am trying to re write a formula in Excel and I am having an issue wit
it.

the forumlat needs to compare a job code then if that job code matche
(D%) it will then populate that cell with the hours worked (A5)


This is the orginal

=IF(D5-11030=0,A5,IF(D5-11050=0,A5,IF(D5-106030=0,A5,IF(D5-106050=0,A5,IF(D5-108100=0,A5,IF(D5-401010=0,A5,IF(D5-441010=0,A5,IF(D5-481010=0,A5,
"))))))))


I need to ad 3 new codes.

010120
411010
107130


So this is the formula I wrote.

=IF(D5-11030=0,A5,IF(D5-11050=0,A5,IF(D5-106030=0,A5,IF(D5-106050=0,A5,IF(D5-108100=0,A5,IF(D5-401010=0,A5,IF(D5-441010=0,A5,IF(D5-481010=0,A5,*IF*(D5-010120=0,A5,IF(D5-411010=0,A5,IF(D5-107130=0,A5,
")))))))))))

but is seams Excel does not like this. Even if I enter the informatio
at the begining it will error and highlite If number 9 (the one i
bold) What am I doing wrong? I need a way that works with all 11 codes
 
F

flydecoder

If I am not mistaken, If functions can only layer seven times. Tr
this...

=IF(OR(D5-11030=0,D5-11050=0,D5-106030=0,D5-106050=0D5-108100=0D5-401010=0,D5-441010=0,D5-481010=0),A5,
"
 
F

flydecoder

I may be misunderstanding you, but wouldn't a SUMIF function solv
this?

Make a list in Column G of your job codes,
If you start in cell G1 with the first job Code, in cell H1 you soul
enter =sumif(<range of column D where job codes are listed>,G1, <Rang
in column A where hours are recorded>)
=sumif($D$5:$D$100,G1,$A$5,$A$100)

Hope this help
 

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