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 |
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 |
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 |
All times are GMT +1. The time now is 02:15 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com