Identify the last character as UPPER or LOWER case

bobgrand

Board Regular
Joined
Apr 14, 2008
Messages
244
Office Version
  1. 365
Platform
  1. Windows
Hello all,
I am trying to identify if the last character of the bin location is upper or lower case. I would like to see the answer in column C.

Can anyone shed some light on how to do this? Any help would be greatly appreciated

ABC
1ITEMBIN LOCATIONUPPER/LOWER
2WIDGET101A02BUPPER
3WIDGET201A06dLOWER
4WIDGET305B06eLOWER
5WIDGET410D02BUPPER

<tbody>
</tbody>
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Try

C2 copied down
=IF(EXACT(RIGHT(B2),UPPER(RIGHT(B2))),"UPPER","LOWER")

M.
 
Upvote 0
Assuming your cells could have blanks or numbers not ending in a letter...

=IF(AND(CODE(RIGHT(B2))>64,CODE(RIGHT(B2))<91),"UPPER",IF(AND(CODE(RIGHT(B2))>96,CODE(RIGHT(B2))<123),"LOWER",""))

If the only possibilities are letters, then this...

=IF(AND(CODE(RIGHT(B2))>64,CODE(RIGHT(B2))<91),"UPPER","LOWER""")
 
Upvote 0
Hi Rick,
You got my wheels spinning,,, Let me give you a little background on how we structure our bin locations. They can be no less than 3 to no more than 6 characters in length. Most of our locations use a 6 character format. (##L##L - 05D08G) The last character of the 6 character format is always a letter either UPPER or LOWER case. Lower case means the material is stocked in multiple areas. We start with a zero to keep the sorting true. We use a tab separated format so there are no blanks at the end of the bins that are 3, 4 or 5 characters in length.

Is it possible to have the results show "UPPER", "LOWER", or "NUMBER"

Thank you for your help and looking forward to your response.

Bob
 
Upvote 0
Try:
Code:
=IF(CODE(RIGHT(B2))=MEDIAN(CODE(RIGHT(B2)),48,57),"NUMBER",IF(CODE(RIGHT(B2))=MEDIAN(CODE(RIGHT(B2)),65,90),"UPPER","LOWER"))
 
Upvote 0
Give this a try...

=IF(AND(CODE(RIGHT(B2))>64,CODE(RIGHT(B2))<91),"UPPER","LOWER""")
Well, that did not come out right.:( I thought I was copy/pasting the following, but I got the above instead. Here is what I meant to post...
Code:
[table="width: 500"]
[tr]
	[td]=IF(AND(CODE(RIGHT(B2))>64,CODE(RIGHT(B2))<91),"UPPER",IF(ISNUMBER(0+RIGHT(B2)),"NUMBER","LOWER"))[/td]
[/tr]
[/table]
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,772
Messages
6,126,803
Members
449,337
Latest member
BBV123

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