Assessing range values 2

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a selected range which consists of one column of various designated
two character codes .e.g. NW, UW,NR, NT and the like.

I need to be able to analyise the range and count the number of instances of
each code. The I then need to enter these values into another sheet in a row
under the various applicable column headings.

For eaxmple.

Source range looks like this:

UW
NW
NT
NW
NT
UT
NW

target looks like this

NW UW NT UT etc
2 1 2 1 etc

The target cells are to be added as the next new row in the target sheet
each time the procedure is run so I need VBA code to do this please.
 
One way:

Assume source range is column A and begins on row 2
and column headings start in B1

in the cell under each column enter this formula:

=COUNTIF($A2:$A50,B$1)

Glen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top