I have been asked to correct a spreadsheet listing thousands of surnames and initials in two columns, with further columns containing data for each person.
The 'initials' column contains either one, two or three upper case initials. The initials have no spaces between them, but these are...
Thanks for your reply, Paul, and for sharing your very sophisticated code.
Yes, I agree there are some drawbacks with the code I've used, but I modified it slightly e.g. to eliminate the 'Van', 'Von', 'De', options. As my Excel column contained only surnames it will suffice, but I can...
Hi Zack
Thanks for your reply.
Sorry but I've never used UDF before, and a search of the subject suggests it would take a while to learn (well, for me, anyway!).
Any chance of showing the equivalent code for a macro?
John B
I'm using Excel 2003, and have a surname column where all entries have been entered in uppercase.
I wish to convert this format to 'Title Case', and have achieved it in most cases by copying to Word then using the 'Change Case' format function, then copying back into Excel.
However, it results...
I have two columns, Surname and Given Name.
Given Name column contains a mixture of
initials, (some with words) e.g. A, AB, AB and CD,
and
words e.g. Alan, John and Fred, Bros, Brothers.
Wherever the Given Name is "Bros" or "Brothers" I would like to cut that word from the Given Name column...
Thank you, Skip.
That's certainly a lot tidier than my effort.
Is there a way to include an instruction in the macro so that it runs only on a selection, i.e. so I can select any group of cells before running the macro, rather than have it work on the whole sheet. I have searched for an answer...
Thanks for pointing me in the right direction, Skip.
I finally figured it was necessary to run the "Replace" function four times in the same macro to eliminate all four punctuation items.
John B
Hi Skip,
I think this is it ??
Sub Punctuation()
'
' Punctuation Macro
' Macro recorded 2/08/2012 by John B
'
' Keyboard Shortcut: Ctrl+p
'
Cells.Replace What:="""", Replacement:="", LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False, SearchFormat:=False...
I would like to remove punctuation from a selection of columns containing text (in Excel 2003).
In particular, the following four characters , . ' "
Is it possible to write a macro to achieve that?
Thanks
John B
Yes!!! That worked OK. Great !
I have literally thousands of rows to check in several spreadsheets, so that will save me a lot.
It missed one case (rare) where there were three initials, H J B and just converted that to HJ B.
Can it be adjusted to handle that situation as well?
John B
I really appreciate your help, Paul, but still not getting a result.
I'm just getting the message "Word has completed its search of the document and has made 0 replacements"
Picture of my trial table attached.
John B
http://www.mediafire.com/view/?5e622c2kh2reozw#
OK, I found the 'Use Wildcard' option, and have it checked.
Now, it is finding the space between the two words at top of column in first cell = "First Names", and eliminating that when I click 'replace', but then not finding any spaces in following cells of the table. ??
i.e. in example...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.