ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   The If function (https://www.excelbanter.com/excel-discussion-misc-queries/94354-if-function.html)

compaq

The If function
 

I have 3 columns, (A) which has calendar months, (B) which is a cost
figure for that month and (C) a “higher” or “lower” statement on that
months cost compared to the previous months.

I have used the formula =IF(C2C3,"higher","lower") to show this, which
works, but where I have copied this formula down to the other cells.

The problem I want to rsolve is that in months where there is no data,
it defaults to a Worse statement, I require it to be empty.

I use this spreadsheet on my pocket pc, so it does not support VB or
conditional formatting. Is there a way of only allowing the statement
if there is data in the cells. I have used the isnumber function, but
this does not work.

Any help appreciated.


Thanks.


--
compaq
------------------------------------------------------------------------
compaq's Profile: http://www.excelforum.com/member.php...o&userid=35484
View this thread: http://www.excelforum.com/showthread...hreadid=552604


SamuelT

The If function
 

Hi,

Try this:

=IF(C2="","",IF(C2C3,"higher","lower"))


--
SamuelT
------------------------------------------------------------------------
SamuelT's Profile: http://www.excelforum.com/member.php...o&userid=27501
View this thread: http://www.excelforum.com/showthread...hreadid=552604


compaq

The If function
 

SamuelT Wrote:
Hi,

Try this:

=IF(C2="","",IF(C2C3,"higher","lower"))



Works a treat, thank you for your help.:)


--
compaq
------------------------------------------------------------------------
compaq's Profile: http://www.excelforum.com/member.php...o&userid=35484
View this thread: http://www.excelforum.com/showthread...hreadid=552604


CLR

The If function
 
=IF(COUNT(C2:C3)=2,IF(C2C3,"higher","lower"),"")

Vaya con Dios,
Chuck, CABGx3




"compaq" wrote:


I have 3 columns, (A) which has calendar months, (B) which is a cost
figure for that month and (C) a €śhigher€ť or €ślower€ť statement on that
months cost compared to the previous months.

I have used the formula =IF(C2C3,"higher","lower") to show this, which
works, but where I have copied this formula down to the other cells.

The problem I want to rsolve is that in months where there is no data,
it defaults to a Worse statement, I require it to be empty.

I use this spreadsheet on my pocket pc, so it does not support VB or
conditional formatting. Is there a way of only allowing the statement
if there is data in the cells. I have used the isnumber function, but
this does not work.

Any help appreciated.


Thanks.


--
compaq
------------------------------------------------------------------------
compaq's Profile: http://www.excelforum.com/member.php...o&userid=35484
View this thread: http://www.excelforum.com/showthread...hreadid=552604



compaq

The If function
 

Hi Again,

Thanks for responding, both formulas work, so thanks for that.

I seem to have another problem though, if I have data that is the same,
it defaults to Lower. Can I get a third Text to appear "Same"?

Thanks again.


--
compaq
------------------------------------------------------------------------
compaq's Profile: http://www.excelforum.com/member.php...o&userid=35484
View this thread: http://www.excelforum.com/showthread...hreadid=552604


CLR

The If function
 

=IF(COUNT(C2:C3)=2,IF(C2C3,"higher",IF(C2<C3,"low er","same")))

Vaya con Dios,
Chuck, CABGx3


"compaq" wrote:


Hi Again,

Thanks for responding, both formulas work, so thanks for that.

I seem to have another problem though, if I have data that is the same,
it defaults to Lower. Can I get a third Text to appear "Same"?

Thanks again.


--
compaq
------------------------------------------------------------------------
compaq's Profile: http://www.excelforum.com/member.php...o&userid=35484
View this thread: http://www.excelforum.com/showthread...hreadid=552604



compaq

The If function
 

CLR Wrote:
=IF(COUNT(C2:C3)=2,IF(C2C3,"higher",IF(C2<C3,"low er","same")))

Vaya con Dios,
Chuck, CABGx3


Hi,

Thanks for the response. Your suggestion works, but I have my original
problem, in future months without data, it defaults to "false" where I
need it to be blank.


Thanks



--
compaq
------------------------------------------------------------------------
compaq's Profile: http://www.excelforum.com/member.php...o&userid=35484
View this thread: http://www.excelforum.com/showthread...hreadid=552604


SamuelT

The If function
 

=IF(C2="","",IF(C2C3,"higher",IF(C2=C3,"Same","Lo wer")))


--
SamuelT
------------------------------------------------------------------------
SamuelT's Profile: http://www.excelforum.com/member.php...o&userid=27501
View this thread: http://www.excelforum.com/showthread...hreadid=552604


compaq

The If function
 

SamuelT Wrote:
=IF(C2="","",IF(C2C3,"higher",IF(C2=C3,"Same","Lo wer")))



Thats the one! Thank you all for your help. What a great site.


--
compaq
------------------------------------------------------------------------
compaq's Profile: http://www.excelforum.com/member.php...o&userid=35484
View this thread: http://www.excelforum.com/showthread...hreadid=552604



All times are GMT +1. The time now is 08:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com