Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Amaloney
 
Posts: n/a
Default Problems with an IF statement


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

the forumlat needs to compare a job code then if that job code matches
(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 information
at the begining it will error and highlite If number 9 (the one in
bold) What am I doing wrong? I need a way that works with all 11 codes.


--
Amaloney
------------------------------------------------------------------------
Amaloney's Profile: http://www.excelforum.com/member.php...o&userid=27283
View this thread: http://www.excelforum.com/showthread...hreadid=467914

  #2   Report Post  
flydecoder
 
Posts: n/a
Default


If I am not mistaken, If functions can only layer seven times. Try
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,"
")


--
flydecoder
------------------------------------------------------------------------
flydecoder's Profile: http://www.excelforum.com/member.php...o&userid=27288
View this thread: http://www.excelforum.com/showthread...hreadid=467914

  #3   Report Post  
Amaloney
 
Posts: n/a
Default


Edit: Thanks I got your formula to work! you rock!!!


--
Amaloney
------------------------------------------------------------------------
Amaloney's Profile: http://www.excelforum.com/member.php...o&userid=27283
View this thread: http://www.excelforum.com/showthread...hreadid=467914

  #4   Report Post  
flydecoder
 
Posts: n/a
Default


I may be misunderstanding you, but wouldn't a SUMIF function solve
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 sould
enter =sumif(<range of column D where job codes are listed,G1, <Range
in column A where hours are recorded)
=sumif($D$5:$D$100,G1,$A$5,$A$100)

Hope this helps


--
flydecoder
------------------------------------------------------------------------
flydecoder's Profile: http://www.excelforum.com/member.php...o&userid=27288
View this thread: http://www.excelforum.com/showthread...hreadid=467914

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If statement Matt Montagliano Excel Discussion (Misc queries) 1 September 8th 05 08:47 PM
Do I need a sumif or sum of a vlookup formula? PeterB Excel Worksheet Functions 0 June 1st 05 12:23 PM
IF Statement Brent New Users to Excel 3 April 29th 05 04:24 PM
What statement to use? Paul Excel Worksheet Functions 6 February 13th 05 05:23 PM
How do I fix a circular reference in a financial statement? drjayhawk25 Excel Discussion (Misc queries) 0 February 7th 05 05:19 PM


All times are GMT +1. The time now is 01:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"