Refactor
:my
=>
'code'
Codes
Refactorings
Popular
Best
Submit
Spam
Account
Logout
Login
JavaScript doesn't seem to be activated, expect things to be ugly and sloppy!
Learn How to Create Your Own Programming Language
createyourproglang.com
Recent
Zynga Slingo Trainer v5.12
iTunes Gift Card Generator V3.1 2012
Diablo 3 GOLD Coins FREE
Working PS3 Jailbreak 3.65 And 3.66
ExtaBit Premium Accounts and Cookies
Steam Wallet Hack - Money Adder & Hack v3
Empires & Allies Hack Cheat Trainer v5.4.1
Eve Onnline 60 Days Time Card Generator v2
Xbox Lve Generator v3
Better way to get content via jQuery $.get()
Popular
XBOX POINTS GENERATOR - MICROSOFT POINTS GENERATOR v1.2012
11 may 2012 premium uploading accounts 100% working
Free Microsoft Points
Free Microsoft Points - Microsoft Points Generator - Xbox Live Codes 2012
Car Town Free Blue Points Hack
Free CarTown Blue Points Generator and CarTown Templates
Free Microsoft Points
Simple Days Purger
Sharecash Downloader Bypass Surveys New 05/2012
PAYPAL REMOVE ACCESS LIMITED ACCOUNT 100% Working
Pastable version of
Column Cleanup - Excel 2002 VBA
<pre class='prettyprint' language='asp_vb.net'>Sub cleanupSheet() ' This function asks for two input the first is the sheet you want to clean up ' The second is the Column and cell you wish to start at, e.g. A1 Dim testRight As String Dim testLeft As String Dim stringLength As Long Dim endRange As String Dim strRange As String Dim inputSheetname As String inputSheetname = InputBox(Prompt:="Enter the Sheetname you want to cleanup.", _ Title:="ENTER SHEETNAME", Default:="Group_Summary") strRange = InputBox(Prompt:="Enter the first Column/Cell.", _ Title:="ENTER RANGE", Default:="A6") Sheets(inputSheetname).Activate ' Turn off screen updating to speed up macro. Application.ScreenUpdating = False ' Loop through the "Sheet" list and clean it up endRange = left(strRange, 1) endRange = endRange + CStr((Range(strRange, Range(strRange).End(xlDown)).Rows.count) + Right(strRange, 1)) For Each x In Sheets(inputSheetname).Range(strRange, endRange) 'See if we are looking at a field with a name in it testLeft = Left(x.Value, 1) If testLeft Like "[a-z, A-Z]" Then 'Test for numbers testRight = Right(x.Value, 1) Do While testRight Like "[0-9]" stringLength = Len(x.Value) stringLength = stringLength - 1 'Remove right most charater from cell x.Value = Left(x.Value, stringLength) testRight = Right(x.Value, 1) Loop 'Test for know String Values testRight = Right(x.Value, 3) If testRight = " OC" Then 'Remove value from right side of cell stringLength = Len(x.Value) stringLength = stringLength - 2 x.Value = Left(x.Value, stringLength) ElseIf testRight = " NH" Then 'Remove value from right side of cell stringLength = Len(x.Value) stringLength = stringLength - 2 x.Value = Left(x.Value, stringLength) End If End If 'Trim spaces from both sides of cell contents x.Value = Trim(x.Value) Next x Application.ScreenUpdating = True MsgBox "Done!" End Sub</pre> <a href="http://www.refactormycode.com/codes/185-column-cleanup-excel-2002-vba" style="color:#fff" title="As seen on RefactorMyCode.com"><img alt="Small_logo" src="http://www.refactormycode.com/images/small_logo.gif" style="border:0" /></a>