Any suggestions for a more direct PROPER text format - Excel VBA -


i'm creating workbook automate formatting process customer service department @ non-profit work for. copy/paste data workbook, run procedures, copy/paste out , import database.

one of processes taking fields such first , last name, etc, , putting them "proper" or "title" case format. code below how i'm executing process can't think there has more direct way. i've searched no avail.

please lend me wisdom!

'proper format range("as1:ba" & mylr).formular1c1 = "=proper(rc[-28])" range("bb1:bb" & mylr).formular1c1 = "=proper(rc[-26])"  range("q2:y" & mylr) = range("as2:ba" & mylr).value range("ab2:ab" & mylr) = range("bb2:bb" & mylr).value  columns("as:bb").delete shift:= xltoright 

just in case want loop through each cell, use this, it's pretty quick...

sub button1_click()     dim mylr long, rng range, c range      mylr = cells(rows.count, "q").end(xlup).row     set rng = range("q2:y" & mylr)      each c in rng.cells         c = strconv(c, vbpropercase)     next c  end sub 

Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -