Excel Validation lists

There is an Excel addin that sales man use to create orders for the company. The addin exports to a comma delimited file for pickup by an SAP database based in Oracle.

There are three columns that represent  that represent each customer. Every third column starting with I to L to O and so on for 100 columns, and with Rows ranging from 17 up to 2500. Each cell potentially in the I,L, and O columns for those stores, represents a Unit of Measure (UOM) for the product that is ordered in the A column. There is a hidden validation list thart presents a dropdown box for the UOM. The validation list is all Uppercase - otherwise it will not be picked up by the importing SAP.

Salesmen have a habit of entering the UOM in lowercase, and it is accepted by the worksheet regardless of the Uppercase in the Validation sheet.

Is there away to ensure that the cell must be entered in Uppercase, changes to Uppercase on losing focus, or can be something be manipulated with the Validation list itself?
dawber39Database Analyst / Application DeveloperAsked:
Who is Participating?
 
Wilder1626Commented:
If you want to set multiple columns to be forced on Uppercase, you can also do something like this:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
 Dim MyCols As Variant
    Dim i As Integer
    Dim LastRow As Long
    Dim MyRow As Long

    MyCols = Array("I", "L", "O")

Application.ScreenUpdating = False
    For i = LBound(MyCols) To UBound(MyCols)
        LastRow = Cells(Rows.Count, MyCols(i)).End(xlUp).Row
        For MyRow = 1 To LastRow
            Cells(MyRow, MyCols(i)) = UCase(Cells(MyRow, MyCols(i)))
        Next MyRow
    Next i
Application.ScreenUpdating = True
End Sub

Open in new window

0
 
dawber39Database Analyst / Application DeveloperAuthor Commented:
Oh... it is a Macro Enabled Workbook
0
 
Wilder1626Commented:
Hi,

What you can do is to use this macro that will automatically put in Uppercase in column A:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim i, LastRow
LastRow = Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To LastRow
Cells(i, "A").Value = UCase(Cells(i, "A").Value)
Next
End Sub

Open in new window


See example below in attachment
uppercase-example.xlsm
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
jmcgOwnerCommented:
This page gives you both a Data Validation method to force your users into entering things in upper case in the first place or, in my opinion more humane, but possibly inefficient, to upper-case the entire spreadsheet whenever something changes.

http://www.extendoffice.com/documents/excel/1722-excel-force-uppercase-lowercase-proper-case.html

For what you paid your SAP people, you'd think they would have handled this seamlessly!
0
 
dawber39Database Analyst / Application DeveloperAuthor Commented:
Thanks - I will post another question related to this - will call it Pt II
0
 
dawber39Database Analyst / Application DeveloperAuthor Commented:
Awesome as usual  - best site around
0
 
Wilder1626Commented:
Thanks to you for using Experts Exchange, and we are always happy to help.
0
 
dawber39Database Analyst / Application DeveloperAuthor Commented:
No Thanks Necessary Jean.... I can always find an answer or direction here. I'm not a novice, but there are times I need help. Even if I cant get an answer - this site sends my mind in a direction that leads me to an answer, and I have come back to share it with those involved - so they have it too.

Thank You so much
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.