+ Reply to Thread
Results 1 to 9 of 9

Cell's insensitive for upper lower letter case

  1. #1
    Registered User
    Join Date
    07-17-2013
    Location
    UK
    MS-Off Ver
    MS Office 2013
    Posts
    30

    Cell's insensitive for upper lower letter case

    Hi.
    I do have small code with in the particular cell checks for todays day. I want to ignor the upper or lower cases i mean there should be no matter how i writte the week day "Friday", "friday" "FRIDAY" "friday", fRIdaY" and so on.
    I did try the Ucase(Range("C1").Value) but it didnt work is there any way to make it work?

    Thanks

    Please Login or Register  to view this content.
    Last edited by Juolupuki; 06-13-2017 at 05:22 PM.

  2. #2
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Cell's insensitive for upper lower letter case

    Isn't this the wrong emphasis?
    Rather than trying to cater for and work around different spellings in C1 by using VBA code, why not ensure C1 always contains the correct spelling by making it a data validation cell and listing the options available.

  3. #3
    Registered User
    Join Date
    07-17-2013
    Location
    UK
    MS-Off Ver
    MS Office 2013
    Posts
    30

    Re: Cell's insensitive for upper lower letter case

    Quote Originally Posted by Richard Buttrey View Post
    Isn't this the wrong emphasis?
    Rather than trying to cater for and work around different spellings in C1 by using VBA code, why not ensure C1 always contains the correct spelling by making it a data validation cell and listing the options available.
    In the cell "C1" will be copied data from diferent workbook and there not always spelled in same way, istead correcting it manually would like just ignore.
    If in cell i copied with the spelled "friday" or in other way it will not triger the macro, will triger just for "Friday".
    Im using this macro on
    Private Sub Worksheet_Change(ByVal Target As Range)

  4. #4
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    '97, 2016
    Posts
    2,523

    Re: Cell's insensitive for upper lower letter case

    Use the worksheet PROPER function to match the weekday names as spelled in your code, and assign the converted value to a variable.
    Please Login or Register  to view this content.
    Please click the Add Reputation star below any helpful posts, and if you have your answer, mark your thread as SOLVED (Thread Tools up top). Thanks!-Lee
    Last edited by leelnich; 06-13-2017 at 06:42 PM. Reason: Corrected to address "C1" in code

  5. #5
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Cell's insensitive for upper lower letter case

    Quote Originally Posted by Juolupuki View Post
    In the cell "C1" will be copied data from diferent workbook and there not always spelled in same way, istead correcting it manually would like just ignore.
    If in cell i copied with the spelled "friday" or in other way it will not triger the macro, will triger just for "Friday".
    Im using this macro on
    Private Sub Worksheet_Change(ByVal Target As Range)
    In that case use code like

    Please Login or Register  to view this content.

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,379

    Re: Cell's insensitive for upper lower letter case

    Perhaps code like this:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  7. #7
    Registered User
    Join Date
    07-17-2013
    Location
    UK
    MS-Off Ver
    MS Office 2013
    Posts
    30

    Re: Cell's insensitive for upper lower letter case

    Quote Originally Posted by leelnich View Post
    Use the worksheet PROPER function to match the weekday names as spelled in your code, and assign the converted value to a variable.
    Please Login or Register  to view this content.
    Please click the Add Reputation star below any helpful posts, and if you have your answer, mark your thread as SOLVED (Thread Tools up top). Thanks!-Lee
    Thats works like a charm! Thats what i need.
    Thanks for prompt answer.

  8. #8
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    '97, 2016
    Posts
    2,523

    Re: Cell's insensitive for upper lower letter case

    Happy to help, thank you for the rep! If completed, please go to Thread Tools up top and mark your thread as SOLVED. -Lee

  9. #9
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,379

    Re: Cell's insensitive for upper lower letter case

    You're welcome and thanks for the rep!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Auto convert lower case to Upper in same cell
    By russkris in forum Excel General
    Replies: 9
    Last Post: 08-08-2014, 06:49 AM
  2. [SOLVED] Convert 1st letter of word to Upper Case and rest to lower case
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-23-2013, 11:44 AM
  3. How to chg lower to upper case in cell?
    By krishnarao in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-16-2007, 01:04 AM
  4. Help w/ project. Counting upper and lower case characters in a cell.
    By triadiemus@yahoo.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-17-2006, 08:10 PM
  5. [SOLVED] Changing file in all upper case to upper and lower case
    By Sagit in forum Excel General
    Replies: 14
    Last Post: 08-25-2005, 10:05 PM
  6. [SOLVED] How do I convert all upper case excel sheet into upper and lower .
    By DebDay in forum Excel General
    Replies: 1
    Last Post: 03-09-2005, 05:06 PM
  7. [SOLVED] How do I change Letter case (lower to Upper) in a spreadsheet???
    By mineisjosh in forum Excel General
    Replies: 4
    Last Post: 02-19-2005, 10:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1