First Letter of each word

I have the following in a text box field:

=IIf([Comp Entered By] Is Null,"",Left([Comp Entered By],1) & Mid([Comp 
Entered By],InStr(1,[Comp Entered By],",")+2,1))

the field "Comp Entered By" is based off of a lookup table of names.

I want the above code to only give me the initials of any given name like:

Christian Many would be CM and the above code is giving me Ch.

What should I change on the above code?

Thanks in advance

0
Utf
6/7/2010 5:48:31 PM
access.reports 4434 articles. 0 followers. Follow

1 Replies
1755 Views

Similar Articles

[PageSpeed] 14

Assuming a max of two words, and exactly one space between first and last word.

   Left([Comp Entered By],1) &
      MID([Comp Entered By],Instr(1,[Comp Entered By]," ")+1,1)

IF you have more than two words (names) in the field then you have to decide 
what you want to do.  Oscar de la Renta, Mary Jo Kopechne, Mary Anne Smythe

PJ wrote:
> I have the following in a text box field:
> 
> =IIf([Comp Entered By] Is Null,"",Left([Comp Entered By],1) & Mid([Comp 
> Entered By],InStr(1,[Comp Entered By],",")+2,1))
> 
> the field "Comp Entered By" is based off of a lookup table of names.
> 
> I want the above code to only give me the initials of any given name like:
> 
> Christian Many would be CM and the above code is giving me Ch.
> 
> What should I change on the above code?
> 
> Thanks in advance
> 
0
John
6/7/2010 7:10:45 PM
Reply:

Similar Artilces:

insert page number in Roman letter
I need to insert page number in Roman letter like this i, ii, iii, iv; how can i do that ? please help me Have a look at Jim Cone's code at this URL http://snipurl.com/9qze Gord Dibben Excel MVP On Tue, 12 Oct 2004 22:35:10 -0700, "Pragati" <Pragati@discussions.microsoft.com> wrote: >I need to insert page number in Roman letter like this i, ii, iii, iv; how >can i do that ? please help me ...

First in First out
I need help in figuring out how to implement FIFO. I order a product and it is put in inventory with a PO and price. Then I may order some more in a few months before I use up all the old, it is added in with its own PO and price. Now when I take out of inventory I want to use up all the items from the first order then switch to the next one. Any help would be nic Thank Ji You need a date stamp at the time the product into inventory. Maybe use an "expected arrival" date on the PO. But how does this relate to Excel? Questions like this should be directed to: http://www.allexpert...

How do I make one word have small caps?
Suppose I have a word named WORDED, and I want the "ORDED" part to become slightly smaller. I want it like "ORDED with smaller caps" and not like this "orded". I tried going selecting "ORDED and changing the font to small caps", but nothing really happened. How do i fix this? The usual way would be to type Worded (with an initial cap), and then format the whole word as Small caps. If the difference isn't sufficient, you could always type the word in all caps and format the W as 12 points and the ORDED as something significantly smaller...

Excel charts and Word docs
In Office 2003, how do I import an excel table into a word doc? In Ms Word go to Insert - Object - Create from File and select the xls file that contains your table. "Frustrated" wrote: > In Office 2003, how do I import an excel table into a word doc? Copy the range in Excel, switch to Word, and paste. Word puts the Excel data into a Word table. - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ "Frustrated" <Frustrated@discussions.microsoft.com> wrote in message news:90F...

How do I print just the first page in my received email
To me it looks like I can either print all, even or odd pages only. can I just print first page only, and how do I do that? HTML messages can be printed one page at a time if you use File, Print on the menu. You can also Edit a plain text message to change it to HTML be able to use File, Print. "PeterM" wrote: > To me it looks like I can either print all, even or odd pages only. can I > just print first page only, and how do I do that? > > Many thanks Mary..........When I'm looking at my email (please remember, this is my 3 day with outlook) how do I cha...

Corruption problems in Word?
Using Office 2003. 125 page Word doc with lots of small Excel spreadsheets (as embedded objects). Repeated corruption problems. Is it more stable to embed or link from Excel to Word? Either way, is it better to use one large Excel file with multiple tabs, or lots of small, separate spreadsheets? Thanks! ...

Word crashes
My Word 2007 crashes when trying to paste pictures, copied from webpages. It don't happen everytime i do it, but often i happens when working with documents with many pictures. After a crash Word locks when trying to save a recreated document, the save window is working extremly slowly, and Word locks compleatly when changing document name and pressing save. When word is locked there are two versions of word running in the taskbar, even thoug I'm only working with one Doc. Have been running the word self dianostic, and came up with nothing, every thing is updatet, ...

word 2000 protected document not protected in 2007
We mostly still use office 2000 and are planning to move to 2010 hopefully this year. We have a few users that have office 2007 and when they open documents that were created and password protected in office 2000 it allows them to make changes and save the file. Any reason for this or way to get around this? ...

Wireless keyboard letters does not activate letters
Wireless keyboard only activates numbers, not letters. Not a Word issue but a keyboard issue. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "captjack1629" <captjack1629@discussions.microsoft.com> wrote in message news:DE24050A-C0A9-46E7-8829-49C50FA9B7E4@microsoft.com... > Wireless keyboard only activates numbers, not letters. > ...

Summary Query based on First Occurrence
I've got a list of invoices for businesses, some which have multiple invoices on a given day. I want to be able to return ONLY the First Day a customer was invoiced AND the TOTAL for just that day. Here's what the data looks like: Account InvoiceDate TotBill A B C Corp. 20041231 3500.00 A B C Corp. 20041231 9500.00 A B C Corp. 20050131 1500.00 A B C Corp. 20050131 2000.00 BARBERS INC. 20041431 1500.00 BARBERS INC. 20041431 12000.00 BARBERS INC. 20050131 300.00 BARBERS INC. 20050131 470.00 Ideally, my Qu...

the first
-- zdx840626��sina.com ...

Word 2007's Find command no longer able to find Style Separators
Word seems to have unexpectedly changed in its ability to find Style Separators. In years past (and versions past), you could insert a Style Separator, then locate it later using Word's find dialog by searching for text "^p" with font Hidden. It is, after all, basically just a paragraph mark, and it's font attribute is Hidden. But all of the sudden--not sure if it's just something that started with Word 2007 SP2--it is no longer found with these parameters. This came as quite a surprise as several macros I use to find Style Separators just stoppe...

Word Mail Merges
Has anyone found some method to attach a Word Document to 20 or 50 (or more) Contacts that CRM 1.2 has done a Mail Merge on? We are using Office XP on Windows XP workstations and we are on CRM 1.2. There must be some solution to this issue. We do Mailings from CRM 1.2 and want to be able track the actual document that was used. Even if there was some way to tell what Word Template we used, that would be a step forward too. Any help would be greatly appreciated. Thanks. off the top of my head, I don't think thats possible with a default setup........(so much for tight integration, ...

Outlook 2003 slow opening first html msg
Anyone else noticed a slowdown recently when opening the first html formatted message in Outlook 2003? It might have occurred during the recent MS updates, or it might be where I upgraded to IE7. That all happened about the same time. On my Pentium 800 with .5gb of ram, the message frame appears in about 20 seconds and the contents in another 20 seconds. This seems to only happen on the first e-mail to be opened. The next opens instantly. Dave ...

Toolbar doesn't react on first click.
Hello everyone. I create program with one toolbar and few CWnd objects in CFrameWnd. Only one window (CWnd) is shown at time. When I start some action on this window (OnLButtonUp and OnlButtonDown) program makes few expensive calculation, next he hides window (SW_HIDE), and shows another (SW_SHOW). But sometimes when I make double-click on window, everything show OK, but toolbar freeze (doesn't react on first click and I must click him once more). I try to override OnLButtonDblClk but my application never goes in to. I thing the problem are messages that are pushed to queue when pr...

Concatenate first:last! worksheet
I need to concatenate 150 rows in 50 different worksheets for a totals page, and may need to add additional worksheets in later versions. So, I need P7 in all 50 worksheets to be concatenated on P6 in the totals page, P8 in all worksheets to be concatenated on P7 in the totals page, etc. I am wondering if it's possible to use something like first:last! to concatenate the worksheet range, making it possible to include additional sheets added in before the current last worksheet. I am using "&" for the concatenate function now as I have more than 30 sheets ...

Transforming first n nodes
I have a large xml (35MB) and I need to transform its top 200 rows using an xsl (in ASP.Net web app). Is this possible to do it in an efficient manner? Thanks. You can subclass XmlTextReader and make a custom one that only return first N elements. Then you can use it to load data into XPathDocument and do a transfer. Yan "Salman" <salman_z_g@hotmail.com> wrote in message news:Oa7kJoiMEHA.1192@TK2MSFTNGP11.phx.gbl... >I have a large xml (35MB) and I need to transform its top 200 rows using an > xsl (in ASP.Net web app). > Is this possible to do it in an efficient...

Locating first blank cell
I am looking for a macro that will select the first blank (empty) cell in a given column please. Thanks, Mike Hi Mike Sub test() Dim GivenColumn As Long GivenColumn = 1 Columns(GivenColumn).Find(What:="", _ After:=Cells(1, GivenColumn), _ LookAt:=xlWhole).Select End Sub HTH. Best wishes Harald "Mike W" <mike@ehb-docks.fsbusiness.co.uk> skrev i melding news:dcq6va$97d$1@newsg4.svr.pol.co.uk... > I am looking for a macro that will select the first blank (empty) cell in a > given column please. > > Thanks, > > Mike > > Brilliant...

All my writing was converted in capitol letters?
My essay is stuck i9n capitol letters and i do not know how to change it back Ctrl+A, then Ctrl+Shift+A. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "NI" <NI@discussions.microsoft.com> wrote in message news:34DBA937-F9E9-497C-AEE8-068C3389DD19@microsoft.com... > My essay is stuck i9n capitol letters and i do not know how to change it > back ...

Word Art
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel I can not insert any text into the wordart. I click on the one that I want, it appears in the centre of my document, it says in the centre, &quot;your text here&quot;, but I can't insert any text, I click into the box and it just stays the same, I click out of it and the icon appears at the top of the page, I type and it just doesn't go into the text/word art box <br><br>Any ideas Once you insert the WordArt object Control/Right-Click it & select 'Edit Text' [or double-clic...

LAST, FIRST to First Last
I have data in LAST, FIRST and used this formula... =TRIM(MID(A2,FIND(",",A2)+1,99))&" "&LEFT(A2,FIND(",",A2)-1) Is there a way to change it from all caps to just capitalized names. Ex. currently - DOE, JOHN change to - John Doe Hi, Like this =PROPER(TRIM(MID(A2,FIND(",",A2)+1,99))&" "&LEFT(A2,FIND(",",A2)-1)) -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "Erinayn...

Calculate due date 1 or 2 years ahead to the first of the followi.
Issue date is June 12,2004. Certificate is valid ( 24 months ) to July 01, 2006. How do I create this is XL? Hi =DATE(YEAR(A1)+2,MONTH(A1),DAY(A1)) -- Regards Frank Kabel Frankfurt, Germany Wayne wrote: > Issue date is June 12,2004. Certificate is valid ( 24 months ) to > July 01, 2006. How do I create this is XL? I modified your's ... does this make sence..seem's to work =DATE(YEAR(B2)+2,MONTH(B2)+1,DAY(B2)-DAY(B2)+1) "Frank Kabel" wrote: > Hi > =DATE(YEAR(A1)+2,MONTH(A1),DAY(A1)) > > -- > Regards > Frank Kabel > Frankfurt, Germany >...

How to Insert Rich Format Text into a Word document ?
Any suggestion is appreciate .thanks in advance. "Sunny" <sound_of_nature@hotmail.com> wrote in message news:uCmDjRn$IHA.3648@TK2MSFTNGP02.phx.gbl... > Any suggestion is appreciate .thanks in advance. > Is the document open in Word, or are you trying to modify a Word file? For the first case, you can use the Word object model (a COM interface) to insert text and to control formatting. There's not much documentation on doing this from C++, so first you have to learn how to do it in the VBA that is part of Word. Then you can translate that into COM calls fro...

First column of range in VLOOKUP contains formula
I have two sheets. Sheet 1 has two columns: 1. Code_Descr (example value: "12345_cookies") 2. Attribute_ID (empty) Sheet 2 has 4 columns: 1. Code (example value: 12345) 2. Descr (example value: "Nr-cookies") 3. Code_Descr (formula: =A2&"_"&B2) 4. Attribute_ID (example value: "BHU340098") The idea is to fill the column Attribute_ID in sheet 1 with the values from sheet 2. But there is a problem. As you can see the Descr-values in both sheets are slightly different. That is because they are from different sources. I want to us...

Finding the first DAY of the week of a given week.
Hi All, I’m building a between statement and need to find the first and last day of a given week. The user will select a date from an active X calendar. The day doesn’t mater, since they are picking a week. The week they select I would like to use as the start and end date. I need the start to be Sunday 00:00:01 and the end to be 1159:59 for the week they select. I’m using datepart to get the week vWeek = DatePart("ww", cal1.Value, vbSunday, vbFirstJan1) vYear = DatePart("yyyy", cal1.Value, vbSunday, vbFirstJan1) In this example my values are vWe...