if there's any way for vba to detect if each individual character in a string is in caps, and if so, convert to lower case, and if it's in lower case, convert to capitalized
The text will vary in length and content... so he wants to see how we can change: "This Is Strange" to "tHIS iS sTRANGE" "THIS IS STRANGE" to "this is strange" "this is strange" to "THIS IS STRANGE"
For Each cel In Range("E6:AI15").Cells If IsError(cel.Value) Then Else Select Case UCase(cel.Value) Case "H" cel.Font.ColorIndex = 0 cel.Interior.ColorIndex = 3 Case "S" cel.Font.ColorIndex = 0 cel.Interior.ColorIndex = 10
but I want the cells to accept both upper and lower case values and format the cells accordingly ie. H or h, S or s
=upper("venkat") returns VENKAT =upper(a1) returns the text in A1 in upper case
similary lower proper will turn the first letter into uppercase
is this what you want;.
Terry <terrybetts11138@hotmail.com> wrote in message news:dbl0dk$poa$1@nwrdmz02.dmz.ncs.ea.ibs-infra.bt.com... > Win XP Pro > Office 2003 > > Using "Excel" and wish to select any text in a worksheet to ALTER the case > to either upper or lower. > When using "Word" it is easy via the menu. > Is there a menu driven option in Excel of using a function for this purpose.
find the "add in" that converts the case text from lower to upper in excel. i've already downloaded this before but can't remember where from and it is much easier than creating a formula or a macro
I've got a column of data that I need to split into further columns, the only way of identifying the split from the data is if a lower case character appears next to an upper case character.
For example, a cell in column A could look like;
Computer ProductsDrivesDVDExternal And I'd need to split that out to cover columns A B and C with
Computer Products / Drives / DVDExternal I'd need to do that for all the cells in column A.
I am using the Find fuction to look for values in cells that contain text in both lower and upper case. I am comparing the values that I have stored in a lookup table. I am running into trouble when the lookup table doesn't match the text cells....
I would like to format a row of cells so that when a word is entered into the cell it automatically becomes a capital.
I need the word to be capitalized so that I can use it in a custom function. The function uses the word from this cell and goes through a bunch of cases in determing how to classify the string.
I think more than one solution is possible and I would greatly appreciate some feed back, I've tried looking into turning all the letters of a string in my VBA code to capitals, or a way to format the cells, so that the string is already capitalized when entered into the VBA code, but I'm still a novice at VBA and unsure on how certain commands work.
here is a sample of my vba code.
Function WeightI(Shape As String, sDim As String, dLenFt As Double) As Double Const pi As Double = 3.14159265358979 Const Ft2In As Double = 12 Const dDen As Double = 0.2835 ' density of steel, pounds per cubic inch
I am trying to detete rows that have several specific values, upper and lower case, (A-H) in any of several columns (B through H). I can delete upper and lower case "D"s in column B, but I'm having difficulty stringing together several variations and getting at the "D"s that are midstream (such as: ADeC), I tried ("*D*") to no avail.
With . Cells(Lrow, "B") If Not IsError(.Value) Then '**** If LCase(.Value) = LCase("D") Then .EntireRow.Delete
In column J of my Excel 2003 worksheet named: Sheet1, is a list of mailing addresses. A copy of the spreadsheet is attached. I need a macro to please capitalise (Upper-case) the second character only of all the Post Office addresses.
Example:
Po Box 65, ORLANDO, NSW 2697
All of my Post Office addresses are prefixed: Po
I need the Post Office addresses to be prefixed: PO
So, the above mentioned example should look like this: PO Box 65, ORLANDO, NSW 2697
I have looked in conditional formatting, but do not see a way to change lower case to all caps. Is there a way to do this so that when someone types in a cell it returns all caps instead of leaving it in lower case?
I have a column containing 8000 records, some of them are in upper case & rest are in proper case, is there any way wherein i can filter all records which are in upper case without using macros, i mean is it possible to do it using ISNA function ?
I have cells that have 1 or 2 words in them. Is there a formula I can use that will make the 1st letter of each word Upper Case. The whole range started out all caps. I used =lower(a1) to make them all lower. Now I just need 1st letter of each word upper.
I am using the following code behind this sheet. In row 9 and column D if I put a lower case letter i want to convert it to uppercase automatically can you see what I am doing wrong.
Private Sub Worksheet_Change(ByVal Target As Range) 'Debug.Print Target.Text & " " & Target.Value & " " & Target.Value2 Dim vVal 'If Target.Cells.Count > 1 Then Exit Sub If Intersect(Target, Range("C9:D28")) Is Nothing _ And Intersect(Target, Range("G9:H28")) Is Nothing _ And Intersect(Target, Range("K9:L28")) Is Nothing _ And Intersect(Target, Range("O9:P28")) Is Nothing _ And Intersect(Target, Range("S9:T28")) Is Nothing _ And Intersect(Target, Range("W9:X28")) Is Nothing _......
I have a series of input boxes and in one particular input box ("TypeScore") if the lower case is entered I want to convert it to upper case. Here is a small snippet of the series of input boxes. I have tried just about every suggestion I can find on this forum, but can't get it to work.
I am trying to change string values of a name from uppercase to lowercase. The data is layed out as lastname then first name. As an example, I have the following values in column C:
ANDERSON MICHAEL SMITH SUSAN P JOHNSON PATRICK JORDAN MICHAEL R WOODS TIGER CLINTON WILLIAM J
I am trying to convert to following (with "," between lastname & firstname):
Anderson, Michael Smith, Susan P Johnson, Patrick Jordan, Michael R Woods, Tiger Clinton, William J
I have a start of how I think the code should flow but can't figure out how to do the conversion.
I have a file with about 30-40 macros in it. In a file with nothing in it, whenever I type the word " range" xl automatically changes it to title case. But I noticed recently everywhere the term 'range' occurs in my macros it is lower case.
I would like a user to be able to enter text into a cell in any case and have it be displayed in all capital letters (or as a "Proper" capitalization). Seems strange that >FORMAT doesn't seem to have a "case" selection.
Past threads show VB code to do this, but I don't want the user to have to click a button to change case. Could the VB code run automatically after the user hits >enter, or tab, or an ->? Is there a way to >FORMAT a cell to do this change? I know the "Upper" & "Proper" functions but it would be very clumsy to have the user enter data in cell A1 just to be displayed in capitals in cell A2.
Example: When user types "lax" in cell A1, I would like "LAX" to be displayed in cell A1.