You are very welcome
Hi, Thank for the marco but i need some help to improve it on the sorting part.
Can i sort as show below? But do take note on the one in red.
"S/N" is in cell A1:
Before:
Sheet4 (2)[TABLE="class: html-maker-worksheet"]
<thead>[TR]
[TH="align: center"][/TH]
[TH="align: center"]A[/TH]
[TH="align: center"]B[/TH]
[TH="align: center"]C[/TH]
[TH="align: center"]D[/TH]
[TH="align: center"]E[/TH]
[TH="align: center"]F[/TH]
[TH="align: center"]G[/TH]
[TH="align: center"]H[/TH]
[/TR]
</thead><tbody>[TR]
[TH="align: center"]1[/TH]
[TD]S/M[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TH="align: center"]2[/TH]
[TD="align: right"]1111[/TD]
[TD="align: right"]8846[/TD]
[TD="align: right"]62[/TD]
[TD="align: right"]
7688e[/TD]
[TD="align: right"]7688[/TD]
[TD="align: right"]2376[/TD]
[TD="align: right"]6100[/TD]
[TD="align: right"]
6100a[/TD]
[/TR]
[TR]
[TH="align: center"]3[/TH]
[TD="align: right"]1112[/TD]
[TD="align: right"]3086[/TD]
[TD][/TD]
[TD="align: right"]
3086a[/TD]
[TD][/TD]
[TD="align: right"]
ABC[/TD]
[TD="align: right"]8991[/TD]
[TD][/TD]
[/TR]
[TR]
[TH="align: center"]4[/TH]
[TD="align: right"]1113[/TD]
[TD="align: right"]6231[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]8783[/TD]
[TD="align: right"]3663[/TD]
[/TR]
[TR]
[TH="align: center"]5[/TH]
[TD="align: right"]1114[/TD]
[TD="align: right"]4385[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TH="align: center"]6[/TH]
[TD="align: right"]1115[/TD]
[TD="align: right"]6385[/TD]
[TD="align: right"]4340[/TD]
[TD="align: right"]7264[/TD]
[TD="align: right"]5391[/TD]
[TD="align: right"]3664[/TD]
[TD="align: right"]9705[/TD]
[TD="align: right"]8592[/TD]
[/TR]
[TR]
[TH="align: center"]7[/TH]
[TD="align: right"]1116[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TH="align: center"]8[/TH]
[TD="align: right"]1117[/TD]
[TD="align: right"]3438[/TD]
[TD][/TD]
[TD="align: right"]404[/TD]
[TD="align: right"]8346[/TD]
[TD="align: right"]2046[/TD]
[TD="align: right"]6934[/TD]
[TD="align: right"]1023[/TD]
[/TR]
[TR]
[TH="align: center"]9[/TH]
[TD="align: right"]1118[/TD]
[TD="align: right"]3277[/TD]
[TD="align: right"]7595[/TD]
[TD="align: right"]6314[/TD]
[TD="align: right"]4464[/TD]
[TD="align: right"]1546[/TD]
[TD="align: right"]9917[/TD]
[TD="align: right"]1794[/TD]
[/TR]
[TR]
[TH="align: center"]10[/TH]
[TD="align: right"]1119[/TD]
[TD][/TD]
[TD="align: right"]3124[/TD]
[TD="align: right"]8722[/TD]
[TD="align: right"]6554[/TD]
[TD="align: right"]3374[/TD]
[TD="align: right"]9603[/TD]
[TD="align: right"]1234[/TD]
[/TR]
</tbody>[/TABLE]
After:
Sheet4 (2)
[TABLE="class: html-maker-worksheet"]
<thead>[TR]
[TH="align: center"][/TH]
[TH="align: center"]A[/TH]
[TH="align: center"]B[/TH]
[TH="align: center"]C[/TH]
[TH="align: center"]D[/TH]
[TH="align: center"]E[/TH]
[TH="align: center"]F[/TH]
[TH="align: center"]G[/TH]
[TH="align: center"]H[/TH]
[/TR]
</thead><tbody>[TR]
[TH="align: center"]1[/TH]
[TD]S/M[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TH="align: center"]2[/TH]
[TD="align: right"]1111[/TD]
[TD="align: right"]62[/TD]
[TD="align: right"]2376[/TD]
[TD="align: right"]6100[/TD]
[TD="align: right"]
6100a[/TD]
[TD="align: right"]7688[/TD]
[TD="align: right"]
7688e[/TD]
[TD="align: right"]8846[/TD]
[/TR]
[TR]
[TH="align: center"]3[/TH]
[TD="align: right"]1112[/TD]
[TD="align: right"]
ABC[/TD]
[TD="align: right"]3086[/TD]
[TD="align: right"]
3086a[/TD]
[TD="align: right"]8991[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TH="align: center"]4[/TH]
[TD="align: right"]1113[/TD]
[TD="align: right"]3663[/TD]
[TD="align: right"]6231[/TD]
[TD="align: right"]8783[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TH="align: center"]5[/TH]
[TD="align: right"]1114[/TD]
[TD="align: right"]4385[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TH="align: center"]6[/TH]
[TD="align: right"]1115[/TD]
[TD="align: right"]3664[/TD]
[TD="align: right"]4340[/TD]
[TD="align: right"]5391[/TD]
[TD="align: right"]6385[/TD]
[TD="align: right"]7264[/TD]
[TD="align: right"]8592[/TD]
[TD="align: right"]9705[/TD]
[/TR]
[TR]
[TH="align: center"]7[/TH]
[TD="align: right"]1116[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TH="align: center"]8[/TH]
[TD="align: right"]1117[/TD]
[TD="align: right"]404[/TD]
[TD="align: right"]1023[/TD]
[TD="align: right"]2046[/TD]
[TD="align: right"]3438[/TD]
[TD="align: right"]6934[/TD]
[TD="align: right"]8346[/TD]
[TD][/TD]
[/TR]
[TR]
[TH="align: center"]9[/TH]
[TD="align: right"]1118[/TD]
[TD="align: right"]1546[/TD]
[TD="align: right"]1794[/TD]
[TD="align: right"]3277[/TD]
[TD="align: right"]4464[/TD]
[TD="align: right"]6314[/TD]
[TD="align: right"]7595[/TD]
[TD="align: right"]9917[/TD]
[/TR]
[TR]
[TH="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FAFAFA]#FAFAFA[/URL] , align: center"]10[/TH]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FAFAFA]#FAFAFA[/URL] , align: right"]1119[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FAFAFA]#FAFAFA[/URL] , align: right"]1234[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FAFAFA]#FAFAFA[/URL] , align: right"]3124[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FAFAFA]#FAFAFA[/URL] , align: right"]3374[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FAFAFA]#FAFAFA[/URL] , align: right"]6554[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FAFAFA]#FAFAFA[/URL] , align: right"]8722[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FAFAFA]#FAFAFA[/URL] , align: right"]9603[/TD]
[/TR]
</tbody>[/TABLE]