Selecting data and adding

sj1601

Board Regular
Joined
Aug 12, 2006
Messages
96
I have two sheets in the same workbook. The first sheet is the raw data and the second one is the intended results sheet.

In the second sheet I have various fields which should refer to the same field on the first sheet and pull data against it and give me the total.

For example:

Sheet 1

Col A Col B
1 A
2 B
3 A
4 C
5 D

Sheet 2

Col A Col B
A Total of A
B Total of B

and so on.

Please note that in the two sheets the two columns are not next to each other.

Any suggestions?

Thanks.

sj1601
 

Some videos you may like

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
Are you summing or counting?

Have a look at Countif and Sumif in Excel help files.
 

sj1601

Board Regular
Joined
Aug 12, 2006
Messages
96
Im summing all the numbers against A, B and so on. So if data against all the A is 1,2,3 then it should return 6 on the second sheet.

Thanks.
 

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
Try

=Sumif(Sheet1!$B$1:$B$10,A1,Sheet1!$A$1:$A$10)

where A1 houses "A"

adjust ranges to suit and copy down.


EDIT: I forgot to make the ranges absolute so you could copy them down....
 

Watch MrExcel Video

Forum statistics

Threads
1,113,849
Messages
5,544,647
Members
410,627
Latest member
georgealice
Top