Capitalize Names (first, Middle And Last)
Nov 15, 2006
I have a routine where I and others enter employee names. It takes whatever case is inputted, and formats it to Capitialize the first name, Middle Initital, and Lastname. However, my routine is flawed slightly and I was wondering if there was a way to fix it.
The flaw is in the names such as McSomething, or MacDonald, McMasters.. the routine will Capitalize the first and last names, put a comma and even put a period if there is a middle initial (or not if there is no middle initial), but I can't figure out how to identify if its a Mc or a Mac or any other of those surnames. The routine will force it to Mcsomething or Macdonald ... so.. any ideas ?? It won't capitalize (in this case) the S in Mcsomething.
Public Sub StandardizeName()
Dim FN, MI, NOFI, NOLI, FirstName, LastName, First, Middle, Lastn As String
'Standardizes all name inputs - due to user input error
FN = TextBox3.Value
Lastn = TextBox1.Value
MI = TextBox4.Value
View 9 Replies
ADVERTISEMENT
Nov 27, 2008
I'm doing an Excel sheet for names, phone numbers...
I'd like cell A1 & B1 to capitalize the the first and last name.
View 14 Replies
View Related
Aug 4, 2008
i found this VBA but i need it to change it for more columns not just column 3 ("C") i also need D F G J T W. how can this formula be modified?
View 9 Replies
View Related
Aug 22, 2008
Is it possible in Excel to capitalize just the first letter of sentence?
Something from this:
"Capital first letter only. After Period Should be capitalized only The First Letter"
to this:
"Capital first letter only. After period should be capitalized only the first letter"
View 9 Replies
View Related
May 31, 2013
I need to capitalize only the very first word of each sentence in a paragraph.
How can I do this?
View 8 Replies
View Related
Mar 3, 2013
I have a large spreadsheet with names (i.e. Smith, John) and would like to capitalize and bold the first word of a range of cells (i.e. SMITH, John). Been searching for hours and all that I can find has to do with capitalizing the first letter, not the first word.
View 5 Replies
View Related
Mar 1, 2002
I generated a large spreadsheet and now for legal reasons all the data has to be in Upper case. Is there a quick way to convert all the text.
View 6 Replies
View Related
Dec 3, 2004
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.
View 8 Replies
View Related
Jul 6, 2007
how can I do this?
Mike A Johnson
Tomas P. Carbone
Samuel L Jackson
Peter B. Lacrone
some have the period some dont.
im thinking I could just get rid of the periods first with a simple find/replace
so getting rid of just the middle initial ?
View 9 Replies
View Related
May 16, 2006
I want to get out of a loop in the middle of it, with out going out from the whole procedure.
By the way, is there is possibility to send him to other location in the code instead of going out of the loop?
Do While ( Cells(counter, 5).Value = 1)
'some commands
If R(1) >= 0.83 * R(2) Then
'some commands
Else
' here I want it to go out of the loop,
' but not to get out of the whole porcedure
End If
counter = counter + 1
Loop
View 7 Replies
View Related
Mar 8, 2008
An application I use at work exports names in a first name-last name format. At this point I have a list of about 315 names in this format. Is there a way I can convert these names to a last name-first name format? I need to export these data on a daily basis, so I'll need to perform this conversion every day. I did a search for this, but didn't find anything.
View 9 Replies
View Related
Apr 4, 2014
I have a worksheet with some names in a column with a persons first name then the second name and I would like to place the names in a different column I can have this to work ok with the following formula
=MID(A1&" "&A1,FIND(" ",A1)+1,LEN(A1))
This works ok but I have people with three names like Peter May Jones
When I have changed the name I would like to have (Jones, Peter May) but I get (May Peter Jones)
Also the colon I have after the first name gets put at the end of the name not after the last name.
View 12 Replies
View Related
Aug 19, 2012
I have code that copies data from one tab, called "Report" - to another tab called "Master". The data in the "Report" tab is actually 2 reports. Both reports have the exact same format but are separated by 1 or 2 blank rows and a Heading row. Before I run the code, I have to delete the blank rows and middle heading row.
I was wondering if there is code that could find these rows and delete them.
The row that I delete has the following values (which are headings): Col 1, 2, 3. The populated columns are A - L
Channel
Alrt Type
Alrt Dt
View 1 Replies
View Related
Jan 10, 2013
I want to extract just the last name from a cell that contains the full name and put just the last into a seperate cell.
WHAT I AM DOING: i copy the contents of a internal screen onto a spreadsheet that i use to check various peices of info and calculations. when i save I like to save my sheet with the last name and then acct number. The internal system screen combines the customers names into a single cell. Right now i have to type the last name into a new cell and have a simple save macro that concatenates that last name with the acct number and saves it into the appropriate folder.
The field i am pulling from is always formatted with FIRST NAME then MI (IF PROVIDED) and then LAST NAME. So when i dump the screen contents into excel A20 may be MIKE SMITH, or MIKE T SMITH. so i need something that looks backwards in the cell and stops at the first space and dumps SMITH into another cell of my choosing (B1 in this case)
View 4 Replies
View Related
Nov 26, 2007
I have a spread sheet that the user enters 3 characters in B2 of a name, then the code will determine out of 35,000 rows with names in Column B how many match the 3 consecutive chracters, all other rows that dont match will hide.
My issue is, that the code seams to find the 3 leters only when there in the middle of a name, and will not identify all other simularities where the 3 letters are at the begining of the name, or at lerast not in all cases.
I adjusted the "Set tempCell = .Columns(2)." to (1) and that worked great but caused other problems.
lastrow = .Cells(Rows.Count, 2).End(xlUp).Row
Set tempCell = .Range("B:B").Find(what:=Left(.Range("B2").Value, 3), After:=.Range("B2"), _
LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False)
If tempCell Is Nothing Then
MsgBox "Not found"
Exit Sub
Else
Set foundCell = tempCell
Range(.Range("B3"), foundCell.Offset(-1, 0)).EntireRow.Hidden = True
End If
Do
Set tempCell = .Columns(2).FindNext(After:=foundCell)
If foundCell.Row >= tempCell.Row Then Exit Do
Range(foundCell.Offset(1, 0), tempCell.Offset(-1, 0)).EntireRow.Hidden = True
Set foundCell = tempCell
Loop
Range("A" & foundCell.Row + 1 & ":A" & lastrow).EntireRow.Hidden = True
End With
End Sub
View 9 Replies
View Related
Jan 29, 2008
I'm using this formula to get a date thats on F16 on sheet2, but instead of returning the date, it returns a number.
="• 500 Euros per month, starting the "&Sheet2!F16&", for 6 months."
View 9 Replies
View Related
Jan 10, 2007
I want to write a macro that is able to copy the 5th position to the 10th position characters from one cell to another. For example, in Cells(B1) contains: Mon Jan 8 09:00:02 2007. Then I want to copy "Jan 8" to Cells(A1). How do I do that? Also, i am not supposed to hardcode the cells. The codes should look something like that
start = InputBox....
end = InputBox...
For i = start To End
Cells(i,"A").Value = (whatever Function To copy 5th To 10th char of Cells(i,"B")).......
Next i
View 3 Replies
View Related
Feb 1, 2008
In A3 is a surname, in B3 is a first name (and possibly multiple middle names, separated by a space). In C3 I'd like the first name ONLY and the surname
A3......................B3.................C3
Hobbs.................Jon Peter........Jon Hobbs
Peters.................Mark..............Mark Peters
Jones..................Bob Tim Mark...Bob Jones
In some cells the format (all in the same cell) is:
A3
View 4 Replies
View Related
May 8, 2014
In the attachments is the original format of the workbook, but the sheets are blanco. Did this on purpose, because the info is sensitive.
Is there a method to delete the middle sheets, 'Total1999' and 'Klad1'?
Is there a VBA code do this in a lot of workbooks, the format of all these books are the same.
Plus I'll place them in one map if it's necessary.
View 13 Replies
View Related
Feb 2, 2009
I have a problem here with the currency style, when I put the number in the cell and clicked the currency style button, the currency is placed in the left side and the number is in right side. How can I make it both in the middle? http://i44.tinypic.com/bfnbqd.jpg
View 4 Replies
View Related
Jul 10, 2009
I'm trying to create a VB Script for an AS/400 app. It's all written but I'm trying to feed the data for part from an excel file. If B5 was 10 I need the final output in my cell to read:
autECLSession.autECLPS.SendKeys "10"
Here is my current formula ="autECLSession.autECLPS.SendKeys"""""&B5*100&""""""
It's reading as autECLSession.autECLPS.SendKeys""10"" which has two sets of quotes not just one and no space between sendkeys and "10"
View 3 Replies
View Related
Jan 23, 2014
I have lots of data in the form of names, and i want to extract all rows of data for that name. So if name "john smith" appears in column A 7 times, i retreice 7 rows of data.
My formula is this...
=IF(ISERROR(INDEX($A$1:$C$7,SMALL(IF($A$1:$A$7=$A$10,ROW($A$1:$A$7)),ROW(1:1)),2)),"",
INDEX($A$1:$C$7,SMALL(IF($A$1:$A$7=$A$10,ROW($A$1:$A$7)),ROW(1:1)),2))
This works perfectly and it gives me my 7 rows of data if i type in "john Smith" into A10, however, i want one more condition to be met in column C, whereby Column C is made up of either 1, or 0. If its a 0 i am not interested, if it is a 1, i am.
View 2 Replies
View Related
Nov 21, 2006
I have a loop that looks like so:
X= 1
Do
FUNCTION(A)
If Condition 1 is True Then...Make Cell B Blue
FUNCTION (B)
X=X+1
Loop Until X = 100
I want to make it so the "If Then" statement, if true, will cause the loop to skip FUnction B and head back to Function A with X equal to X+1. What do I put in the if statement to make this happen. NEXT X or something?
View 9 Replies
View Related
Mar 22, 2007
I have a several hundred rows of data that are telephone line type, number and user name all concatenated. This is the way the data arrives. I need to extract the number and user name into 2 separate columns - I do not need the phone type. Is there a formula that can identify numbers within text. I can't use Text to Columns as the leading telephone line type varies and I don't want to use VBA to do the work. There are at least 10 different line types, example of some:
SPECTRUM TIPT 0740357052 LUNCH ROOM
SPECTRUM ANALOGUE 0744076642 J BROWN
EXCHANGE LINE (PSTN/PSTN) 0742031346 HAYES SUB
FAXSTREAM DUET 0742003232 NORTH SUBSTATION
M/BANK (Spectrum) 0740318578 MB TO 4429
P PHONE (TELSTRA) 0744074159 B WILLIAMS
WITHIN ANALOGUE 0784625967 I MAKIT
the following phones start witn an "N"
PRIVATE LINE (PAPL) N7035896P ROTHMANS SUBSTATION
PRIVATE LINE (VGDL) VOICE LINK N7563069P P BLACK
PRIVATE LINE 2 WIRE PREMIUM (PAPL) N70079 FITZGIBBON G
PRIVATE LINE 4 WIRE PREMIUM (PAPL) N70335 SUBS SSKLB
Can this be done or will I have to resort to code.
View 9 Replies
View Related
Nov 29, 2007
I am unsure how to go about this....
View 9 Replies
View Related
Apr 7, 2008
Dim varUserInput As Variant
varUserInput = InputBox("Enter 3 Digit Number:", _
"Project Number", "")
If varUserInput "" Then Exit Sub
View 9 Replies
View Related
Jan 13, 2009
I have a spreadsheet of location names that look like this:
UT-04560803-DF3
AZ-57611564-S32
etc...
I'm looking for a way to pull the last four digits out of the middle section of these entries, so that I end up with:
0803
1564
etc...
View 9 Replies
View Related
Sep 8, 2009
I just bought a database and I would say at least 20% of the names in the database have an initial after the first name. I need to have a clean first and last name list. Is there a formula that can delete the initials? I am working on a variable data print project that uses their first name in the message so I cannot have their middle initial.
So like in one example her first name is listed as Susan F. I want it to just be Susan. Another example is T. Jones as a last name, I want it to be just Jones.
View 9 Replies
View Related
May 17, 2013
I have a large excel spreadsheet which looks at a number of test results for students in school. The worksheet being prepared by marcos to display different class results dependent on the teacher select so they can view their class data. The sheet works fine and does all I need but have a fault with the transfer of test results which contain zeros. These are transfered with the zero missing even if the zero is in the middle of the number eg 203. The display if zeros is not suppressed and I have no format to suppress zeros but also understand these commands on suppress empty cells containing just zero.
This code will bring up the fault shown above and will loose zeros so 10 on source sheet becomes 1 and 102 becomes 12
VB : =IFERROR(SUBSTITUTE((VLOOKUP($A11,INDIRECT($H$14),550,False)),"0",""),"")
I wondered if the SUBSTITUTE command is causeing issues but cannot remember quite what this command does - may have copied from elsewhere and not fully understood it.
The following code is used elsewhere on the same worksheet to display the same test result but in a individual pupil format rather than as a class sheet.
VB : =IFERROR(VLOOKUP($C$7,INDIRECT($H$14),888,False),"")
This picks up the same result but does not suppress the zeros. It cannot be used to do the job of the upper code as it reads from the original source where as the upper line of code reads from a central point which does not change so the data from 6 different areas is copied into this area.
These are not part of macros just in a cell. The cells are not formatted and then right click format cell is just "general".
Needless to say I need to know what I have done wrong to get the test result to be displayed incorrectly so I can correct it to get the sheet right.
View 1 Replies
View Related
Aug 1, 2014
How I could get an average of a 12 number list while at the same time removing the highest and lowest numbers. They aren't in any order either.
1087.2
1041.35
1040.35
1049.65
800.45
734.15
835.7
1157.15
1145
1098.5
788.6
1265.85
View 6 Replies
View Related