Sort and Group

%3CLINGO-SUB%20id%3D%22lingo-sub-3001300%22%20slang%3D%22en-US%22%3ESort%20and%20Group%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3001300%22%20slang%3D%22en-US%22%3E%3CP%3EDear%20All%3C%2FP%3E%3CP%3EI%20hope%20you%20are%20having%20a%20great%20day%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Efirst%2C%20I%20would%20like%20to%20thank%20you%20all%20for%20your%20effort%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3Byour%20support%20regarding%20this%20issue%20is%20highly%20appreciated%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CUL%3E%3CLI%3E%3CSTRONG%3EDevice%20and%20OS%20platform%3C%2FSTRONG%3E%2C%20Windows%2010%26nbsp%3B%3C%2FLI%3E%3CLI%3E%3CSTRONG%3EExcel%20product%20name%20and%20version%20number%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B2013%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSTRONG%3EExcel%20file%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSTRONG%3Eyou%E2%80%99re%20working%20with%3A%26nbsp%3B%3CSTRONG%3ECopy%20file%26nbsp%3B%3C%2FSTRONG%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%230000FF%22%3E%3CSTRONG%3E%3CU%3ENote%3A%20The%20contained%20data%20is%20Railway%20Industry%26nbsp%3B%3C%2FU%3E%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23000000%22%3EA%20Code%20or%20macros%20to%20do%20the%20following%20%3CSTRONG%3Eautomated%3C%2FSTRONG%3E%20%3A%20%3C%2FFONT%3E%3C%2FP%3E%3CP%3E-%20First%20%2F%26nbsp%3B%20Sort%20the%20data%20based%20on%20columns%20(%20i%2Cj%2Ck%2Cl%2Cm%2Cn)%20%3CU%3EAscending%26nbsp%3B%3C%2FU%3E%3C%2FP%3E%3CP%3E-%20then%20%22%3CSTRONG%3Emain%20point%3C%2FSTRONG%3E%22%20%2F%20Group%20the%20data%20based%20on%20columns%20(%20K%20and%20L%20)%2C%20grouping%20based%20on%20data%20values%2C%2C%20if%20it's%20the%20same%20data%2C%20or%20above%20-%20below%20(%20maximum%20by%205%20)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eorange%20highlight%3A%20same%20data%26nbsp%3B%3C%2FP%3E%3CP%3Eyellow%20highlight%3A%20same%20%2B%20around%20by%205%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CU%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3Ekeep%20in%20mind%20the%20data%20is%20unfixed%20(quantity%20and%20data%20)%26nbsp%3B%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FU%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%23%20see%20the%20example%20below%20%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Untitled.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F329136i52B0A53B5212007B%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Untitled.png%22%20alt%3D%22Untitled.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ehope%20the%20issue%20is%20clear%2C%20and%20thank%20you%20in%20advance%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%23%20find%20a%20copy%20of%20the%20file%20attached%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3001300%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Contributor

Dear All

I hope you are having a great day 

 

first, I would like to thank you all for your effort 

 

 your support regarding this issue is highly appreciated 

 

  • Device and OS platform, Windows 10 
  • Excel product name and version number 2013
  • Excel file you’re working with: Copy file 

 

Note: The contained data is Railway Industry 

 

A Code or macros to do the following automated :

- First /  Sort the data based on columns ( i,j,k,l,m,n) Ascending 

- then "main point" / Group the data based on columns ( K and L ), grouping based on data values,, if it's the same data, or above - below ( maximum by 5 )

 

orange highlight: same data 

yellow highlight: same + around by 5 

 

keep in mind the data is unfixed (quantity and data ) 

 

# see the example below : 

 

Untitled.png

 

hope the issue is clear, and thank you in advance 

 

# find a copy of the file attached 

 

0 Replies