+ Reply to Thread
Results 1 to 3 of 3

Help with a multiple OR statement.

  1. #1
    Pank
    Guest

    Help with a multiple OR statement.

    I need to construct a multiple OR statement that looks at the first 5
    characters of a cell (G16) and if it is Table, Day-T or Eveni, then
    expression 1, otherwise expression 2.

    Having asked a colleague, they have come up with:-

    =IF(OR(LEFT(G16,5)="Table,LEFT(G16,5)="Day-T,
    LEFT(G16,5)="Eveni),expression 1,expression 2)

    Is there an easier way to write the above?

    Any assistance offered would be welcome.

    Regards

    PM


  2. #2
    Andrew Taylor
    Guest

    Re: Help with a multiple OR statement.

    You can use:

    =IF(OR(LEFT(G16,5)={"Table","Day-T","Eveni"}),expression 1,expression
    2)

    entered as an array formula (Ctrl-Shift-Enter)

    Andrew


    Pank wrote:
    > I need to construct a multiple OR statement that looks at the first 5
    > characters of a cell (G16) and if it is Table, Day-T or Eveni, then
    > expression 1, otherwise expression 2.
    >
    > Having asked a colleague, they have come up with:-
    >
    > =IF(OR(LEFT(G16,5)="Table",LEFT(G16,5)="Day-T",
    > LEFT(G16,5)="Eveni),expression 1,expression 2)
    >
    > Is there an easier way to write the above?
    >
    > Any assistance offered would be welcome.
    >
    > Regards
    >
    > PM



  3. #3
    Pank
    Guest

    Re: Help with a multiple OR statement.

    Andrew,

    Thank U for your swift response.

    Regards

    PM

    "Andrew Taylor" wrote:

    > You can use:
    >
    > =IF(OR(LEFT(G16,5)={"Table","Day-T","Eveni"}),expression 1,expression
    > 2)
    >
    > entered as an array formula (Ctrl-Shift-Enter)
    >
    > Andrew
    >
    >
    > Pank wrote:
    > > I need to construct a multiple OR statement that looks at the first 5
    > > characters of a cell (G16) and if it is Table, Day-T or Eveni, then
    > > expression 1, otherwise expression 2.
    > >
    > > Having asked a colleague, they have come up with:-
    > >
    > > =IF(OR(LEFT(G16,5)="Table",LEFT(G16,5)="Day-T",
    > > LEFT(G16,5)="Eveni),expression 1,expression 2)
    > >
    > > Is there an easier way to write the above?
    > >
    > > Any assistance offered would be welcome.
    > >
    > > Regards
    > >
    > > PM

    >
    >


+ 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