# Beginner. Needing help with a Basic if statement with a left

#### tranquil

##### New Member
Basically I am having issues with the syntax of my formula.

I have

C1256
F1235
V2256

I want to convert that data to show that if the first letter is C then return "Catalog", F then return friends and family and v as video.

Here is what I had so far =IF(OR(LEFT(P3,1)="C","Catalog")

### Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Sheet1

 * A B 1 C1256 Catalog 2 F1235 Friends & Family 3 V2256 Videos

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:64px;"><col style="width:111px;"></colgroup><tbody>
</tbody>

 Cell Formula B1 =LOOKUP(LEFT(A1),{"C","F","V"},{"Catalog","Friends & Family","Videos"}) B2 =LOOKUP(LEFT(A2),{"C","F","V"},{"Catalog","Friends & Family","Videos"}) B3 =LOOKUP(LEFT(A3),{"C","F","V"},{"Catalog","Friends & Family","Videos"})

<tbody>
</tbody>

<tbody>
</tbody>

Excel tables to the web >> Excel Jeanie HTML 4

Try:
=IF(LEFT(P3)="C","Catalog",IF(LEFT(P3)="F","Family and Friends",IF(LEFT(P3)="V","Video","")))

Welcome to the Mr.Excel forum and Message Board.

There are multiple ways you could accomplish this. (Edit: I'm "late" & 2 approaches I've listed below were already suggested!)
=IF(LEFT(P3,1)="C","Catalog",IF(LEFT(P3,1)="F","Friends and Family",IF(LEFT(P3,1)="V","Video","Everything Else")))

Another approach:
=LOOKUP(LEFT(P3,1),{"C","F","V"},{"Catalog","Friends and Family","Video"})

If you have a whole list, you might consider a table on another sheet and then use the formula shown below
Sheet2 Col A Sheet2 Col B
 C Catalog F Friends and Family V Video

<TBODY>
</TBODY>

=IF(ISERROR(INDEX(Sheet2!B:B,MATCH(LEFT(P3,1),Sheet2!A:A,FALSE),1)),"Everything Else",INDEX(Sheet2!B:B,MATCH(LEFT(P3,1),Sheet2!A:A,FALSE),1))

Replies
2
Views
757
Replies
10
Views
442
Replies
8
Views
1K
Replies
9
Views
493
Replies
2
Views
555

1,203,241
Messages
6,054,326
Members
444,717
Latest member
melindanegron

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back