+ Reply to Thread
Results 1 to 5 of 5

Using CONCATENATE function with multiple ifs

  1. #1
    Registered User
    Join Date
    12-03-2007
    Posts
    5

    Using CONCATENATE function with multiple ifs

    Hey,
    I got a problem with the formula that I am trying to produce. The end result is supposed to look something like this:

    xxxx is starting soon on channel yyyy (ex. Family Guy is starting soon on channel 48)
    or
    xxxx is now playing on channel yyyy (ex. Family Guy is now playing on channel 48)
    or
    ""

    What I already have is different columns for which TV show, the channel, if it is playing soon, and another for if it is playing or not. What I need to do is put that all together and come out with either of those 3 statements.

    Thanks,
    WondersAlo
    ...if you do not understand let me know what you do not understand I will rephrase

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,727
    If A1 contains show B1 contains either "not playing", "now playing" or "starting soon" and C1 contains channel number try

    =IF(B1="Not playing","",A1&" is "&B1&" on channel "&C1)
    Last edited by daddylonglegs; 12-03-2007 at 09:04 AM.

  3. #3
    Registered User
    Join Date
    12-03-2007
    Posts
    5
    that works, but it does not apply all the rules. I must make a formula that lets the viewer know if the show is playing soon, or is now playing, and if neither use "".
    What I got so far is two IF's but cannot put them together.
    =IF(J8="yes",CONCATENATE(A8, " is playing now on channel ", B8),"")
    and
    =IF(K8="yes",CONCATENATE(A8, " is starting soon on channel ", B8),"")

    where
    J8 = the playing now or not column (i.e yes or no)
    K8 = if the show is playing soon or not column (i.e yes or no)
    A8 = the tv show that is playing (i.e Family Guy)
    B8 = the channel the tv show is playing on (i.e 48)
    Last edited by WondersAlo; 12-04-2007 at 10:29 PM.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,727
    So presumably only 1 of J8 or K8 can show "Yes" but if neither of them do you want the formula to return a blank?

    Try

    =IF(AND(J8<>"Yes",K8<>"Yes"),"",A8&IF(J8="Yes"," is playing now"," is starting soon")&" on channel "&B8)

  5. #5
    Registered User
    Join Date
    12-03-2007
    Posts
    5
    thanks a bunch, works perfectly...

+ 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