Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 8
Angry "IF" Statement Problem

I'm trying to do nested IF's, when I run each if statement seperately they work fine, but when I merge them into one line of code they give me #Value error. Any help would be appreciated!

Here's the 3 specific lines:

=IF('Requestor Information'!E28<"",'Requestor Information'!E28)

=IF(AND(C5<0,'Requestor Information'!G35="Yes"),SUM('Requestor Information'!E28+7+3))

=IF(AND(C5<0,(OR('Requestor Information'!G35="No",'Requestor Information'!G35=""))),SUM('Requestor Information'!E28+7+1))


Putting them together --
=IF('Requestor Information'!E28<"",'Requestor Information'!E28),IF(AND(C5<0,'Requestor Information'!G35="Yes"),SUM('Requestor Information'!E28+7+3)),IF(AND(C5<0,(OR('Requestor Information'!G35="No",'Requestor Information'!G35=""))),SUM('Requestor Information'!E28+7+1))

I also want to add another bit of code that says if any of the numbers returned are < 10 then the cell will = 10... I haven't even looked at that yet until I can get the other problem resolved!!!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default "IF" Statement Problem

Putting them together --
=IF('Requestor Information'!E28<"",'Requestor
Information'!E28),IF(AND(C5<0,'Requestor
Information'!G35="Yes"),SUM('Requestor
Information'!E28+7+3)),IF(AND(C5<0,(OR('Requestor
Information'!G35="No",'Requestor Information'!G35=""))),SUM('Requestor
Information'!E28+7+1))


lajohn,
You are closing the parentheses too quickly. For a nested if w/ 3
outcomes you have the following:

=IF(cond1, outcome1, IF(cond2, outcome2, outcome3))

What you are doing:

=IF(cond1, outcome1),IF(cond2,outcome2),IF(...

As you see your are finishing your IF too quickly. Correcting your
formula:

=IF('Requestor Information'!E28<"",'Requestor
Information'!E28,IF(AND(C5<0,'Requestor
Information'!G35="Yes"),SUM('Requestor
Information'!E28+7+3),IF(AND(C5<0,OR('Requestor
Information'!G35="No",'Requestor Information'!G35="")),SUM('Requestor
Information'!E28+7+1))))

HTH
Kostis Vezerides

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default "IF" Statement Problem

How about:

=IF('Requestor Information'!E28<"",'Requestor Information'!E28,0)+IF(C5<0,IF('Requestor
Information'!G35="Yes",10,IF(OR('Requestor Information'!G35="No",'Requestor
Information'!G35=""),8,0)))

But it is far better to put your problem into words....

HTH,
Bernie
MS Excel MVP


"lajohn63" wrote in message
...

I'm trying to do nested IF's, when I run each if statement seperately
they work fine, but when I merge them into one line of code they give
me #Value error. Any help would be appreciated!

Here's the 3 specific lines:

=IF('Requestor Information'!E28<"",'Requestor Information'!E28)

=IF(AND(C5<0,'Requestor Information'!G35="Yes"),SUM('Requestor
Information'!E28+7+3))

=IF(AND(C5<0,(OR('Requestor Information'!G35="No",'Requestor
Information'!G35=""))),SUM('Requestor Information'!E28+7+1))


Putting them together --
=IF('Requestor Information'!E28<"",'Requestor
Information'!E28),IF(AND(C5<0,'Requestor
Information'!G35="Yes"),SUM('Requestor
Information'!E28+7+3)),IF(AND(C5<0,(OR('Requestor
Information'!G35="No",'Requestor Information'!G35=""))),SUM('Requestor
Information'!E28+7+1))

I also want to add another bit of code that says if any of the numbers
returned are < 10 then the cell will = 10... I haven't even looked at
that yet until I can get the other problem resolved!!!




--
lajohn63



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default "IF" Statement Problem

Thats excactly what you do! You just have to work on the rest when you put
them togethter and put it in a column, well.... Microsoft Excel probably
won't read it because it is to much, so you need to work on getting it
smaller some how. You need to go to http://www.micexcelhelp.com/column.help
and they should list some solutions. :] Hope it works for you!
"lajohn63" wrote in message
...

I'm trying to do nested IF's, when I run each if statement seperately
they work fine, but when I merge them into one line of code they give
me #Value error. Any help would be appreciated!

Here's the 3 specific lines:

=IF('Requestor Information'!E28<"",'Requestor Information'!E28)

=IF(AND(C5<0,'Requestor Information'!G35="Yes"),SUM('Requestor
Information'!E28+7+3))

=IF(AND(C5<0,(OR('Requestor Information'!G35="No",'Requestor
Information'!G35=""))),SUM('Requestor Information'!E28+7+1))


Putting them together --
=IF('Requestor Information'!E28<"",'Requestor
Information'!E28),IF(AND(C5<0,'Requestor
Information'!G35="Yes"),SUM('Requestor
Information'!E28+7+3)),IF(AND(C5<0,(OR('Requestor
Information'!G35="No",'Requestor Information'!G35=""))),SUM('Requestor
Information'!E28+7+1))

I also want to add another bit of code that says if any of the numbers
returned are < 10 then the cell will = 10... I haven't even looked at
that yet until I can get the other problem resolved!!!




--
lajohn63



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
importing csv files, problem with date formats jiwolf Excel Worksheet Functions 5 March 7th 06 12:48 AM
If Statement linked to cell with VLOOKUP problem - getting wrong v Mike R. Excel Worksheet Functions 4 January 14th 06 02:16 PM
"If" statement using "And" Amanda Excel Discussion (Misc queries) 2 December 28th 05 03:02 PM
Fundamental problem with IF statement David F Excel Worksheet Functions 4 May 12th 05 09:34 PM
Formula Problem - If Statement Margie Excel Worksheet Functions 4 April 29th 05 10:07 PM


All times are GMT +1. The time now is 10:49 AM.

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"