the use of UPPER

taliapaw

New Member
Joined
Sep 14, 2016
Messages
16
Hi I've modified my formula or at least tried to because I want only upper case letters to be inputted for the data. My data format is as follows 1234AB12345 where AB must be capital. I've tried using the upper function in my formula but it still allows for lower case letters. I've been stuck on fixing this issue for two days now any help or suggestions would be great appreciated.

=AND(ISNUMBER(LEFT(A1,4)*1),UPPER(ISTEXT(MID(A1,5,2))),ISNUMBER(MID(A1,7,5)*1),LEN(A1)=11)

I'm using this formula in MS excel in data validation.
 
Last edited:

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
very basic, but just try =UPPER(A1)

edit: my bad didn't see the data validation part
 
Last edited:
Upvote 0
Try

=AND(ISNUMBER(LEFT(A1,4)*1),EXACT(UPPER(MID(A1,5,2)),MID(A1,5,2)),ISNUMBER(MID(A1,7,5)*1),LEN(A1)=11)
 
Last edited:
Upvote 0
Another possibility:


Book1
AB
11234ab12345FALSE
21234AB12345TRUE
312345A12345FALSE
Sheet1
Cell Formulas
RangeFormula
B1=AND(ISNUMBER(LEFT($A1,4)*1),(SUMPRODUCT(--(MATCH(CODE(MID($A1,{5,6},1)),{0,65,91,255})=2)))=2,ISNUMBER(MID($A1,7,5)*1),LEN($A1)=11)


WBD
 
Upvote 0
Jonmo1 his works great, so basically the problem was I never separated the middle text. Thank you.


wideboydixon I now see an error in my original code however your formula isn't allowed to be used in data validation because of the use of reference operators (such as unions, intersections, and ranges) or array constants.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,001
Messages
6,122,648
Members
449,092
Latest member
peppernaut

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