Link to home
Create AccountLog in
Avatar of Fordraiders
FordraidersFlag for United States of America

asked on

uppercase an alpha numeric text

excel 2010 vba..

Putting data on a sheet from code...from an access database.


ActiveCell.Offset(0, 1).Range("A1").Value = UCase(rs.Fields(2).Value) 'MFRNUM

If the value in rs.Fields(2).Value is say:
1505k422

I need to to put on the sheet   1505K422

if any alpha characters are lowercase...they need to be uppercase.

Thanks
fordraiders
Avatar of Kyle Abrahams, PMP
Kyle Abrahams, PMP
Flag of United States of America image

You can use the upper formula
=UPPER(A1)
fordraiders,
I am not understanding your question.

The Excel VBA part of the statement looks correct to me, though you don't need the .Range("A1") part of it:
ActiveCell.Offset(0, 1).Value = UCase(rs.Fields(2).Value)     'MFRNUM

And at my favorite supply house, that would be a Miniature Light Bulb #1847, Incandescent, 6.3 Volt, 0.15 Amp

Brad
Avatar of Fordraiders

ASKER

I tried that :
ActiveCell.Offset(0, 1).Value = UCase(rs.Fields(2).Value)     'MFRNUM
but still posted on ther sheet in lowercase ?

very funny on the description.
ASKER CERTIFIED SOLUTION
Avatar of byundt
byundt
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Thanks...did work