Excel VBA - How to sort by first two letters of cell? -
i have 2 columns want sort. want below column first sorted first 2 letters, column b.
column - column b ab - info 3339876 ab - data 3339877 ab - data 3339878 ac - info 3339123 ac - data 3339124 ac - info 3339125 ad - info 3339456 ad - info 3339457 ad - data 3339458
the first 2 letters of column important , must sorted them first. information after first 2 letters of column irrelevant , not matter. more important column b # data sorted in ascending order second (after first 2 letters of column a)
sorry confusion. clears things up.
sort highlighting column , hit alt + a + sa
update:
'excel sorts alphanumeric text left right, character character'
, may not order numbers if combined single cell. should create column 2 letter code want use sorting using =left(a2,2)
, copying way down. multilayered sort clicking sort button, sorting first on 2 digit code alphabetically , second on number column:
Comments
Post a Comment