+ Reply to Thread
Results 1 to 9 of 9

The If function

  1. #1
    Registered User
    Join Date
    06-16-2006
    Posts
    10

    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(C2>C3,"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.

  2. #2
    Valued Forum Contributor
    Join Date
    09-23-2005
    Location
    Bristol, UK
    MS-Off Ver
    2007
    Posts
    664
    Hi,

    Try this:

    =IF(C2="","",IF(C2>C3,"higher","lower"))

  3. #3
    Registered User
    Join Date
    06-16-2006
    Posts
    10
    Quote Originally Posted by SamuelT
    Hi,

    Try this:

    =IF(C2="","",IF(C2>C3,"higher","lower"))

    Works a treat, thank you for your help.

  4. #4
    CLR
    Guest

    RE: The If function

    =IF(COUNT(C2:C3)=2,IF(C2>C3,"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(C2>C3,"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
    >
    >


  5. #5
    Registered User
    Join Date
    06-16-2006
    Posts
    10
    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.

  6. #6
    CLR
    Guest

    Re: The If function


    =IF(COUNT(C2:C3)=2,IF(C2>C3,"higher",IF(C2<C3,"lower","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
    >
    >


  7. #7
    Registered User
    Join Date
    06-16-2006
    Posts
    10
    [QUOTE=CLR]=IF(COUNT(C2:C3)=2,IF(C2>C3,"higher",IF(C2<C3,"lower","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

  8. #8
    Valued Forum Contributor
    Join Date
    09-23-2005
    Location
    Bristol, UK
    MS-Off Ver
    2007
    Posts
    664
    =IF(C2="","",IF(C2>C3,"higher",IF(C2=C3,"Same","Lower")))

  9. #9
    Registered User
    Join Date
    06-16-2006
    Posts
    10
    Quote Originally Posted by SamuelT
    =IF(C2="","",IF(C2>C3,"higher",IF(C2=C3,"Same","Lower")))

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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1