SOLVED
Home

Extract Characters from Left End of Cell

%3CLINGO-SUB%20id%3D%22lingo-sub-793461%22%20slang%3D%22en-US%22%3EExtract%20Characters%20from%20Left%20End%20of%20Cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-793461%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20some%20cells%20that%20contain%20either%203%20or%204%20characters.%26nbsp%3B%20I%20need%20to%20extract%20the%20first%20character%20if%20the%20total%20number%20of%20characters%20is%203%20and%20extract%20the%20first%202%20characters%20when%20the%20total%20number%20of%20characters%20if%204.%26nbsp%3B%20I%20have%20played%20around%20with%20the%20LEFT%20function%20but%20am%20not%20sophisticated%20enough%20to%20get%20the%20correct%20results.%3C%2FP%3E%3CP%3EWhen%20cell%20is%20%221234%22%2C%20then%20extract%20%2212%22%3C%2FP%3E%3CP%3EWhen%20cell%20is%20%22ABC%22%2C%20then%20extract%20%22A%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ety%2C%3C%2FP%3E%3CP%3EBe-Rad%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-793461%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-793511%22%20slang%3D%22en-US%22%3ERe%3A%20Extract%20Characters%20from%20Left%20End%20of%20Cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-793511%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F388681%22%20target%3D%22_blank%22%3E%40Be-Rad%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3DLEFT(A1%2CLEN(A1)%2F2)%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-794267%22%20slang%3D%22en-US%22%3EExtract%20Characters%20from%20Left%20End%20of%20Cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-794267%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1639%22%20target%3D%22_blank%22%3E%40Detlef%20Lewin%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ety%20so%20much.%26nbsp%3B%20appreciate%20you.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Be-Rad
New Contributor

I have some cells that contain either 3 or 4 characters.  I need to extract the first character if the total number of characters is 3 and extract the first 2 characters when the total number of characters if 4.  I have played around with the LEFT function but am not sophisticated enough to get the correct results.

When cell is "1234", then extract "12"

When cell is "ABC", then extract "A"

 

ty,

Be-Rad

2 Replies
Solution

@Be-Rad 

=LEFT(A1,LEN(A1)/2)

@Detlef Lewin 

 

ty so much.  appreciate you.

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
38 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies