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

tranquil

New Member
Joined
Apr 10, 2013
Messages
3
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

*AB
1C1256Catalog
2F1235Friends & Family
3V2256Videos

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

Spreadsheet Formulas
CellFormula
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
 
Upvote 0
Try:
=IF(LEFT(P3)="C","Catalog",IF(LEFT(P3)="F","Family and Friends",IF(LEFT(P3)="V","Video","")))
 
Upvote 0
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!)
Your formula:
=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</SPAN>
Catalog</SPAN>
F</SPAN>
Friends and Family</SPAN>
V</SPAN>
Video</SPAN>

<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))
 
Upvote 0

Forum statistics

Threads
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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top