+ Reply to Thread
Results 1 to 4 of 4

Excel 2007 : Long IF Statements

  1. #1
    Registered User
    Join Date
    11-27-2009
    Location
    Newcastle, England
    MS-Off Ver
    Excel 2003
    Posts
    4

    Angry Long IF Statements

    Hi, right, i need a complex IF statement which counts up a column, and if the field in the column is blank, it says "Free Seat" into the cell. The probelm is, i cant get any part of the IF statement to work, i dont know where the if statement goes(in the cell of at the bottom of row 23). This is for my A levels, so if anyone can help in anyway, thank you.

    Basically, i am trying to make the IF statement look a LITTLE bit like this:

    =IF(R4, "", Free)

    Now thats obviously not right. Now the bigger problem is, i need to create a formula for the IF statement.. 54x bigger. Like this..

    =IF(R4, "", Free+IF(R5, "", Free+IF(R6, "", Free+IF(R7, "", Free+IF(R8, "", Free............+IF(R54, "", Free)))))))))))))))))))))))))))))))))))))))))))))))))))))

    If anyone can help me with this equation.. it will be great help.

    Thank You Very Much!

  2. #2
    Valued Forum Contributor JeanRage's Avatar
    Join Date
    03-02-2009
    Location
    Nice, France
    MS-Off Ver
    Excel 2003
    Posts
    705

    Re: Long IF Statements

    Hi,

    Most probably the solution lies in a lookup() function ...
    Could you post your file for a precise answer ...

    HTH

  3. #3
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Long IF Statements

    To make it work the syntax would be
    =IF(R4,"","Free"&IF(R5,""," Free"))
    you may be better off to create a UDF
    Last edited by pike; 12-02-2009 at 06:02 AM.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Long IF Statements

    Maybe, if you just need to count how many free seats there are in the column, i.e. how many empty cells in the range A1:A100, use

    =SUMPRODUCT(--(ISBLANK(a1:a100)))

    adjust ranges to suit your workbook layout.

    To put the words "free seat" next to a cell that is blank, use in B1

    =if(isblank(A1),"free seat", "")
    copy this formula down (adjust the cell reference first!)

    Then you could also simply count how often the term "free seat" occurs in column B

    =countif(b1:b100,"free seat")

    again, adjust ranges to suit

    hth
    Last edited by teylyn; 12-02-2009 at 06:13 AM. Reason: added countif

+ 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