#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default If statement

Hi Everyone,
I am having trouble getting my formula to follow my logic!

I want the cell to follow the logic of:
If AG360,then enter AL28-AG36,however if AL28-AG36<0 then enter 0
I currently have
=IF(AG360,AG36-AL28,AL28), IF(AG36-AL28<0,0,AG36-AL28)

My logic is not following how it should be and I am getting a Value error.

Thanks in advance!
Cheers,
Meg
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default If statement

I think this formula does what you want...

=IF(AG360,MAX(0,AG36-AL28),AL28)

--
Rick (MVP - Excel)


"meggie" wrote in message
...
Hi Everyone,
I am having trouble getting my formula to follow my logic!

I want the cell to follow the logic of:
If AG360,then enter AL28-AG36,however if AL28-AG36<0 then enter 0
I currently have
=IF(AG360,AG36-AL28,AL28), IF(AG36-AL28<0,0,AG36-AL28)

My logic is not following how it should be and I am getting a Value error.

Thanks in advance!
Cheers,
Meg


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default If statement

Your description and formula do not match. As per your description

"If AG360,then enter AL28-AG36,however if AL28-AG36<0 then enter 0" try the
below

=IF(AG360,MAX(0,AL28-AG36))

If this post helps click Yes
---------------
Jacob Skaria


"meggie" wrote:

Hi Everyone,
I am having trouble getting my formula to follow my logic!

I want the cell to follow the logic of:
If AG360,then enter AL28-AG36,however if AL28-AG36<0 then enter 0
I currently have
=IF(AG360,AG36-AL28,AL28), IF(AG36-AL28<0,0,AG36-AL28)

My logic is not following how it should be and I am getting a Value error.

Thanks in advance!
Cheers,
Meg

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default If statement

and the FALSE statement goes as AL28

=IF(AG360,MAX(0,AL28-AG36),AL28)

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

Your description and formula do not match. As per your description

"If AG360,then enter AL28-AG36,however if AL28-AG36<0 then enter 0" try the
below

=IF(AG360,MAX(0,AL28-AG36))

If this post helps click Yes
---------------
Jacob Skaria


"meggie" wrote:

Hi Everyone,
I am having trouble getting my formula to follow my logic!

I want the cell to follow the logic of:
If AG360,then enter AL28-AG36,however if AL28-AG36<0 then enter 0
I currently have
=IF(AG360,AG36-AL28,AL28), IF(AG36-AL28<0,0,AG36-AL28)

My logic is not following how it should be and I am getting a Value error.

Thanks in advance!
Cheers,
Meg

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
Embedding an OR statement in an IF statement efficiently Chatnoir11 Excel Discussion (Misc queries) 4 February 2nd 09 08:12 PM
SUMIF statement with AND statement Eric D Excel Discussion (Misc queries) 2 July 14th 08 07:24 PM
appending and IF statement to an existing IF statement spence Excel Worksheet Functions 1 February 28th 06 11:00 PM
If statement and Isblank statement Rodney C. Excel Worksheet Functions 0 January 18th 05 08:39 PM
Help please, IF statement/SUMIF statement Brad_A Excel Worksheet Functions 23 January 11th 05 02:24 PM


All times are GMT +1. The time now is 02:42 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"