Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Trying to Capitalise on Input to Cells
I have the following Private Sub within my relevant sheet that I'm trying to
capitalise all values entered in a Range of cells, but it returns a syntax error on entry, I guess its got to do with the way I've typed in the ranges in the formula, can anyone assist? Thanks Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Count = 1 Then If Not Intersect(.Cells, Range("E9:E37"; "I9:I37", "M9:M37", "Q9:Q37", "U9:U37")) Is Nothing Then Application.EnableEvents = False .Value = UCase(.Value) Application.EnableEvents = True End If End If End With End Sub |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Trying to Capitalise on Input to Cells
If Not Intersect(.Cells, Range("E9:E37;I9:I37;M9:M37;Q9:Q37;U9:U37")) Is
Nothing Then HTH -- AP "John" a écrit dans le message de news: ... I have the following Private Sub within my relevant sheet that I'm trying to capitalise all values entered in a Range of cells, but it returns a syntax error on entry, I guess its got to do with the way I've typed in the ranges in the formula, can anyone assist? Thanks Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Count = 1 Then If Not Intersect(.Cells, Range("E9:E37"; "I9:I37", "M9:M37", "Q9:Q37", "U9:U37")) Is Nothing Then Application.EnableEvents = False .Value = UCase(.Value) Application.EnableEvents = True End If End If End With End Sub |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Trying to Capitalise on Input to Cells
Try:
If Not Intersect(Target, Range("E9:E37, I9:I37, M9:M37,Q9:Q37 , U9:U37 ")) Is Nothing Then HTH "John" wrote: I have the following Private Sub within my relevant sheet that I'm trying to capitalise all values entered in a Range of cells, but it returns a syntax error on entry, I guess its got to do with the way I've typed in the ranges in the formula, can anyone assist? Thanks Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Count = 1 Then If Not Intersect(.Cells, Range("E9:E37"; "I9:I37", "M9:M37", "Q9:Q37", "U9:U37")) Is Nothing Then Application.EnableEvents = False .Value = UCase(.Value) Application.EnableEvents = True End If End If End With End Sub |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Trying to Capitalise on Input to Cells
Thanks Guys
"Toppers" wrote in message ... Try: If Not Intersect(Target, Range("E9:E37, I9:I37, M9:M37,Q9:Q37 , U9:U37 ")) Is Nothing Then HTH "John" wrote: I have the following Private Sub within my relevant sheet that I'm trying to capitalise all values entered in a Range of cells, but it returns a syntax error on entry, I guess its got to do with the way I've typed in the ranges in the formula, can anyone assist? Thanks Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Count = 1 Then If Not Intersect(.Cells, Range("E9:E37"; "I9:I37", "M9:M37", "Q9:Q37", "U9:U37")) Is Nothing Then Application.EnableEvents = False .Value = UCase(.Value) Application.EnableEvents = True End If End If End With End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
make multiple cells in 1 worksheet equal multiple cells in another | Excel Worksheet Functions | |||
Display first, second, etc Nonblank Cells in a Range | Excel Worksheet Functions | |||
Locking The Cells with Input At The Time of Saving The File | Excel Discussion (Misc queries) | |||
how do I calculate an input "c" to add certain cells? | Excel Worksheet Functions | |||
Convert data type of cells to Text,Number,Date and Time | Excel Worksheet Functions |