Re: Conditional splitting of cells
From: Tom Ogilvy (twogilvy_at_msn.com)
Date: 07/30/04
- Next message: Hari: "Re: Scroll view doesnt work in Code"
- Previous message: CLR: "Concatenate formula with relative cells"
- In reply to: Peter: "Conditional splitting of cells"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 30 Jul 2004 09:50:05 -0400
varr = Array("mr","mrs","ms","dr")
for i = lbound(varr) to ubound(varr)
iloc = instr(1,sCustomerName,varr(i),vbTextCompare)
if iloc <> 0 then
sTitle = varr(i)
exit for
end if
Next
Would be a start. You would also want to check that you found a title and
not a substring in the name (neDReck Smith for example)
-- Regards, Tom Ogilvy "Peter" <olsson_p@yahoo.com> wrote in message news:239f3ee0.0407300520.4dcbef7c@posting.google.com... > I've run into a problem and would be really grateful for any help. > > I bascially need to import data from a spreadsheet into our customer > database but I need to split the 'customer name' field into three > separate ones - Title (as applicable)/First Name/Last Name. > > The problem is that there is no consistency in how this data has been > captured so some names contain their Title while others don't. I've > already found a macro that allows me to split out the last name into a > new column but I also need to identify Titles (hoping to being able to > identify Mr/Mrs/Ms/Dr) where they appear and move them as well. Can > anyone think of a macro that could do this? > > Thanks again, > Peter
- Next message: Hari: "Re: Scroll view doesnt work in Code"
- Previous message: CLR: "Concatenate formula with relative cells"
- In reply to: Peter: "Conditional splitting of cells"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|