ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Searching Uppercase characters (https://www.excelbanter.com/excel-discussion-misc-queries/236921-searching-uppercase-characters.html)

Shams

Searching Uppercase characters
 
Folks,
I have a text description in a cell which will sometime have the first 4
characters as uppercase:

i.e.

XBDP BDA OTHER: BOARDROOM PROD 08425360I

I want to be able to evaluate XBDP and return with the text "IA Code". I
thought I could do a left function combination that is evaluating an
uppercase string saying: if(left(A1,4) is uppercase, then type in the text
"IA Code" else type in the code "Other". I am trying to avoid doing a text
to column excel function.

I'll appreciate any help on this. Thank you.

Regards,
Shams.

NBVC[_96_]

Searching Uppercase characters
 

Try

=IF(EXACT(LEFT(A1,4),UPPER(LEFT(A1,4))),"IA Code","")


--
NBVC

Where there is a will there are many ways.
'The Code Cage' (http;//www.thecodecage.com)
------------------------------------------------------------------------
NBVC's Profile: http://www.thecodecage.com/forumz/member.php?userid=74
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=116170


Shams

Searching Uppercase characters
 
Thank you very much for your help! I realized one more wrinkle in the text
after I sent out my message:

XBDP BDA OTHER: BOARDROOM PROD 08425360I

The good news about this text is that the variant XBDP will always be
followed by a space. So, can I add the space as well to my parameters so
that if the left(a1, 4) is uppercase as well has a space immediately
following it then return left(A1,4).

Thank you.

Regards,
Shams

"NBVC" wrote:


Try

=IF(EXACT(LEFT(A1,4),UPPER(LEFT(A1,4))),"IA Code","")


--
NBVC

Where there is a will there are many ways.
'The Code Cage' (http;//www.thecodecage.com)
------------------------------------------------------------------------
NBVC's Profile: http://www.thecodecage.com/forumz/member.php?userid=74
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=116170



NBVC[_97_]

Searching Uppercase characters
 

Try:

=IF(AND(EXACT(LEFT(A1,4),UPPER(LEFT(A1,4))),MID(A1 ,5,1)=" "),"IA
Code","Other")

or

=IF(AND(EXACT(LEFT(A1,4),UPPER(LEFT(A1,4))),MID(A1 ,5,1)="
"),LEFT(A1,4),"Other")


--
NBVC

Where there is a will there are many ways.
'The Code Cage' (http;//www.thecodecage.com)
------------------------------------------------------------------------
NBVC's Profile: http://www.thecodecage.com/forumz/member.php?userid=74
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=116170



All times are GMT +1. The time now is 09:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com