The following code copies any values within range CL145:CZ145, in which each digit is one increment higher or lower than the digit before and after it then paste the result to row 162, starting in column CL, all other remaining values in the range CL145:CZ145, copy and paste to row 162, starting column CW. Each output within the range have commas separating the each digit.
Example of values that meet this condition: 1,2 or 2,3, or 6,7 or 21,22
Examples of values that do no meet this condition 3,5 or 7,10 or 11,14

sample data1:
CL145=2,3.....CM145=4,7......CN145=6,7
Result
CL162=2,3...CM162=6,7
CW162=4,7

How do I update the code to add all the others rows in the source range CL145:CZ160 into the CL and CW columns as listed below. Output ranges are CL162:CU177 and CW162:DF177.
I need to update this function to work the same as in does in source row 145 to output 162
for source rows 145-148 to output 162-165
For the 3 digits values with 2 commas using the same rules in 149-152 output 166-169
For the 4 digits values with 3 commas using the same rules in 153-156 output 170-173
For the 5 digits values with 4 commas using the same rules in 157-160 output 174-177

sample data2:
CL150=1,2,3……CM150=1,15,23……CN150=2,7,19
Result
CL167=1,2,3…….CW167=1,15,23…...CX167=2,7,19

Please Login or Register  to view this content.