![]() LastR = sh.Range("A" & sh.unt).End(xlUp).row ![]() ![]() It can be easily adapted to return in another sheet: Sub processRangeAH()ĭim sh As Worksheet, lastR As Long, rng As Range, arr, i As Long Now it returns overwriting the existing range. It will place the range to be processed in an array and drop down the processed result at the end. Please, try the next compact and fast code. StrDataRange.Sort Key1:=keyRange, Header:=xlYes Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ Range(Selection, Selection.End(xlUp)).Select ), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal Range(Selection, Selection.End(xlDown)).Select Range(Selection, Selection.End(xlToRight)).Select Would anyone be able to show me a more efficient solution? Sub Clean() What I have so far "works" but it results in a very long list of 0.0000 values in column G that makes copying out the cleaned data difficult. The data also needs to be sorted alphabetically by column C then by column H.Īfter this is done the header row (1). Otherwise no math operation to the row needs to be performed. If the string ends in "KK" the value in Column G needs to be "IT", "LN" or "SJ" then the row value in Column G needs to be divided by 100. I have some data that will always be 8 columns (A-H) the number of rows could be different every time (Dynamic).
0 Comments
Leave a Reply. |