Creating a table

M

murfitUK

There's probably an easier way to do it but...

I have a series of numbers in column A (150 in all) and a series of letters
in column B (22 in all). In total there are 4800 rows.

What I am trying to do is create a table with the number down the left hand
side and the letters across the top. In each cell within the table I need
to count how many times the combination of number/letter appears. Eg:

A B C
201 0 2 2
202 3 0 1
203 3 6 4

I tried combining the number/letter into a single text field using the
CONCATENATE function then filtering and writing down the number but there
are just too many combinations!

I have managed to use the COUNTIF function for the very first entry (201/A)
but when I drag to extend the formula it changes the columns.

I have posted a screen to show what I mean if anyone would care to look:

http://homepage.ntlworld.com/murfituk/pics/example.JPG

As you can see there are 3 items with the "201" number and "A" letter.

When I extend the formula to the B, C, D & E cells it changes the column
from C3:C32 to D3:D32, E3:E32 etc which isn't what I want.

Like I said, there is probably an easier way to do it but I am not an expert
with Excel. Any comments/suggestions gladly received.

Thanks for your time.
 
R

Roger Govier

Hi

One way, assuming your data is on Sheet1, and you set up your results table
on Sheet2 in A1:D4, enter the following formula into cell B2 of Sheet2 and
copy across through cells C2:D2, then copy B2:D2 down through B3:B4

=SUMPRODUCT(--(Sheet1!$A$1+$A$4800=$A2),--(Sheet1!B$!:$B$4800=B$1))

Regards

Roger Govier
 
M

Mladen_Dj

Putting absolute reference in your formula could solve your problem. Instead
"C3:C32", use "$C$3:$C$32", and when you copy formula to another column,
reference $C$3:$C$32 will not change.
 

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

Similar Threads

The lowest of all? 6
Match 2 values 4
Access Transposing data in Access? 8
Excel Convert word into numbers and back 4
Worksheet Names using Macros 5
convert a number to letter 2
SlNo. 3
table to xyz list 3

Top