ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   cleverer code (https://www.excelbanter.com/excel-discussion-misc-queries/243367-cleverer-code.html)

Jack Sons

cleverer code
 
Hi all,

In colums A to M the a number of cells (say 1 to 20 at most) contain coded
information like B45K of 345Tgd or contain nothing.
Example:

A B C D E F
G H I
er34 g67BB 12E HNG33 78R4E er34 12E
12E AAA KHG5 K8K9 K8K9
12E nnG 12E er34
HNG33 12E er34

In each column I want to show only the unique information with the number of
times it occurs in that column, so the above example it would result in
this:

A B C D
E F G H
I
er34 ( 1 ) g67BB ( 1 ) 12E ( 2 ) HNG33 ( 2 ) 78R4E
( 1 ) er34 ( 3 ) 12E ( 1 )
12E ( 1 ) AAA ( 1 ) KHG5 ( 1 )
K8K9 ( 1 ) K8K9 ( 1 )

nnG ( 1 ) 12E ( 2 )

I did succeed in writing code that does the job, but to me it seems rather
clumsy and laborious.

I'm looking for cleverer code, your assistance will be appreciated.

Jack Sons
The Netherlands



Jim Thomlinson

cleverer code
 
Post what you have...
--
HTH...

Jim Thomlinson


"Jack Sons" wrote:

Hi all,

In colums A to M the a number of cells (say 1 to 20 at most) contain coded
information like B45K of 345Tgd or contain nothing.
Example:

A B C D E F
G H I
er34 g67BB 12E HNG33 78R4E er34 12E
12E AAA KHG5 K8K9 K8K9
12E nnG 12E er34
HNG33 12E er34

In each column I want to show only the unique information with the number of
times it occurs in that column, so the above example it would result in
this:

A B C D
E F G H
I
er34 ( 1 ) g67BB ( 1 ) 12E ( 2 ) HNG33 ( 2 ) 78R4E
( 1 ) er34 ( 3 ) 12E ( 1 )
12E ( 1 ) AAA ( 1 ) KHG5 ( 1 )
K8K9 ( 1 ) K8K9 ( 1 )

nnG ( 1 ) 12E ( 2 )

I did succeed in writing code that does the job, but to me it seems rather
clumsy and laborious.

I'm looking for cleverer code, your assistance will be appreciated.

Jack Sons
The Netherlands




Jack Sons

cleverer code
 
Tomorrow, so please watch this thread.

Jack.

"Jim Thomlinson" schreef in
bericht ...
Post what you have...
--
HTH...

Jim Thomlinson


"Jack Sons" wrote:

Hi all,

In colums A to M the a number of cells (say 1 to 20 at most) contain
coded
information like B45K of 345Tgd or contain nothing.
Example:

A B C D E
F
G H I
er34 g67BB 12E HNG33 78R4E er34 12E
12E AAA KHG5 K8K9 K8K9
12E nnG 12E
er34
HNG33 12E er34

In each column I want to show only the unique information with the number
of
times it occurs in that column, so the above example it would result in
this:

A B C D
E F G H
I
er34 ( 1 ) g67BB ( 1 ) 12E ( 2 ) HNG33 ( 2 )
78R4E
( 1 ) er34 ( 3 ) 12E ( 1 )
12E ( 1 ) AAA ( 1 ) KHG5 ( 1 )
K8K9 ( 1 ) K8K9 ( 1 )

nnG ( 1 ) 12E ( 2 )

I did succeed in writing code that does the job, but to me it seems
rather
clumsy and laborious.

I'm looking for cleverer code, your assistance will be appreciated.

Jack Sons
The Netherlands






Jack Sons

cleverer code
 
Jim,

I checked my code and saw that I followed a totally different - and very
laborious - way to get the final result. Yesterday I found a relatively
simple way to arrive at a point that corresponds with the example below. The
question now is how to get from there to the result I showed below the
example. I believe there will be a not too complicated way to do it, but I
don't know how.
Please help me further.

Jack.

"Jim Thomlinson" schreef in
bericht ...
Post what you have...
--
HTH...

Jim Thomlinson


"Jack Sons" wrote:

Hi all,

In colums A to M the a number of cells (say 1 to 20 at most) contain
coded
information like B45K of 345Tgd or contain nothing.
Example:

A B C D E
F
G H I
er34 g67BB 12E HNG33 78R4E er34 12E
12E AAA KHG5 K8K9 K8K9
12E nnG 12E
er34
HNG33 12E er34

In each column I want to show only the unique information with the number
of
times it occurs in that column, so the above example it would result in
this:

A B C D
E F G H
I
er34 ( 1 ) g67BB ( 1 ) 12E ( 2 ) HNG33 ( 2 )
78R4E
( 1 ) er34 ( 3 ) 12E ( 1 )
12E ( 1 ) AAA ( 1 ) KHG5 ( 1 )
K8K9 ( 1 ) K8K9 ( 1 )

nnG ( 1 ) 12E ( 2 )

I did succeed in writing code that does the job, but to me it seems
rather
clumsy and laborious.

I'm looking for cleverer code, your assistance will be appreciated.

Jack Sons
The Netherlands







All times are GMT +1. The time now is 02:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com