Remember Me?

#1
November 1st 04, 09:43 AM
 iwgunter Posts: n/a
=SUM Then insert word.

I need a, in my book, complex function:

Code:
--------------------
=SUM C2-B2
IF < 0 { } ELSE IF == 0 { 0 Days } ELSE IF == 1 { 1 Day } ELSE IF = 2 { * Days }
--------------------

This is probably written all wrong, but I'm used to writing in PHP, not
Excel Functions.

Basically IF result is less than 0 leave cell empty, IF result is 1
enter "1 Day", IF result is greater or equal to 2 enter "[result]
Days".

Many Thanks
Ian Gunter

--
iwgunter
------------------------------------------------------------------------
iwgunter's Profile: http://www.excelforum.com/member.php...o&userid=15441

#2
November 1st 04, 09:58 AM
 Alex Delamain Posts: n/a

This should do it

=IF(C2-B2<=0,"",IF(C2-B2=1,"1 day",+C2-B2&" Days"))

--
Alex Delamain
------------------------------------------------------------------------
Alex Delamain's Profile: http://www.excelforum.com/member.php...o&userid=11273

#3
November 1st 04, 10:07 AM
 Arvi Laanemets Posts: n/a

Hi

=IF(OR(C2="",B2="",C2-B2<0),"",(C2-B2) & " Day" & IF(C2-B2=1,"","s")))

--
Arvi Laanemets
(When sending e-mail, use address arvil<Attarkon.ee)

"iwgunter" wrote in message
...

I need a, in my book, complex function:

Code:
--------------------
=SUM C2-B2
IF < 0 { } ELSE IF == 0 { 0 Days } ELSE IF == 1 { 1 Day } ELSE IF = 2

{ * Days }
--------------------

This is probably written all wrong, but I'm used to writing in PHP, not
Excel Functions.

Basically IF result is less than 0 leave cell empty, IF result is 1
enter "1 Day", IF result is greater or equal to 2 enter "[result]
Days".

Many Thanks
Ian Gunter

--
iwgunter
------------------------------------------------------------------------
iwgunter's Profile:

http://www.excelforum.com/member.php...o&userid=15441

#4
November 1st 04, 10:13 AM
 mzehr Posts: n/a

Hi,
Try
=IF(C2-B2=0,"",IF(C2-B2=1,"1 DAY",IF(C2-B2= 2, C2-B2 & " Days","N/A")))

"iwgunter" wrote:

I need a, in my book, complex function:

Code:
--------------------
=SUM C2-B2
IF < 0 { } ELSE IF == 0 { 0 Days } ELSE IF == 1 { 1 Day } ELSE IF = 2 { * Days }
--------------------

This is probably written all wrong, but I'm used to writing in PHP, not
Excel Functions.

Basically IF result is less than 0 leave cell empty, IF result is 1
enter "1 Day", IF result is greater or equal to 2 enter "[result]
Days".

Many Thanks
Ian Gunter

--
iwgunter
------------------------------------------------------------------------
iwgunter's Profile: http://www.excelforum.com/member.php...o&userid=15441

 Posting Rules Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On

 Similar Threads Thread Thread Starter Forum Replies Last Post C TO Charts and Charting in Excel 0 January 17th 05 06:57 PM excel Setting up and Configuration of Excel 1 December 28th 04 02:50 PM excel Setting up and Configuration of Excel 2 December 24th 04 12:51 PM Dan Ward Excel Discussion (Misc queries) 2 December 15th 04 12:01 AM S.W. Excel Discussion (Misc queries) 2 December 7th 04 11:29 PM

All times are GMT +1. The time now is 10:09 PM.