Thank you for helping out. The solution provided does not allow other data
to be entered into the cell. The code should only used to convert "qs" to
uppercase if "qs" is found to be in lowercase. If other data is found in the
target cell this data should take precedence over "QS" In other words allow
any data to be entered into the cell but should "QS" happen to be entered
into the cell and it has accidentally been entered in lowercase convert it
to uppercase.
"Tom Ogilvy" <twogilvy@msn.com> wrote in message
news:Ohx1UWUEFHA.1188@tk2msftngp13.phx.gbl...
> If Not IsEmpty(Cells(21, 11)) Then _
> Cells(21, 11).Value = "QS"
>
> or
>
> If Not IsEmpty(Cells(21, 11)) Then _
> Cells(21, 11).Value = Ucase("qs")
>
> if it could have a string like qs123
> or ABqsCA
>
> If Not IsEmpty(Cells(21, 11)) Then _
> Cells(21, 11).Value = _
> Application.Substitute(cells(21,11),"qs","QS")
>
> --
> Regards,
> Tom Ogilvy
>
>
>
>
> "Pat" <glass_patrick@hotmail.com> wrote in message
> news:u%23NF%23OUEFHA.2508@TK2MSFTNGP09.phx.gbl...
> > When K11 contains the value "QS" and it is entered in lowercase I want
to
> > use code to convert the characters to uppercase. The cell is formatted
to
> > accept text and can contain other values.
> >
> > Here is my attempt at writing part of the code. Need help to complete
it.
> >
> > If Not IsEmpty(Cells(21, 11)) Then
> > .Value = "qs"
> >
> > Thanks if you can help.
> > Pat
> >
> >
>
>
Bookmarks