Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Lazclark
 
Posts: n/a
Default do i use vlookup or sumproduct???

I have these two sheets (as an example)

Sheet 1 :

..........A................ B........... C .........D
......Product .........Total
......Codes ..........sales
3 ..apples
4..pears
5 ..bananas

Sheet 2:


..............s...................t.............. u ...............v
.............Product... Sales
.............Codes
48 ......apples........ 20
49...... pears .........15
50..... bananas...... 23
51 ......apples .........8
52 .....apples .........13
53 ...bananas .........15

In column b on sheet 1, i wish to total the sales values - so for example
column b 3 i wish to add up ALL the sales of apples (20+8+13 =answer 41)....

What formula do i need to put in column b3 to achieve this?

many thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
Franz Verga
 
Posts: n/a
Default do i use vlookup or sumproduct???

Nel post
*Lazclark* ha scritto:

I have these two sheets (as an example)

Sheet 1 :

.........A................ B........... C .........D
.....Product .........Total
.....Codes ..........sales
3 ..apples
4..pears
5 ..bananas

Sheet 2:


.............s...................t.............. u ...............v
............Product... Sales
............Codes
48 ......apples........ 20
49...... pears .........15
50..... bananas...... 23
51 ......apples .........8
52 .....apples .........13
53 ...bananas .........15

In column b on sheet 1, i wish to total the sales values - so for
example column b 3 i wish to add up ALL the sales of apples (20+8+13
=answer 41)....

What formula do i need to put in column b3 to achieve this?

many thanks



If the two sheets are on the same workbook you can use SUMIF or SUMPRODUCT:

=SUMIF(Sheet2!$S$48:$S$53,A3,Sheet2!$T$48:$T$53)

=SUMPRODUCT((Sheet2!$S$48:$S$53=A3)*(Sheet2!$T$48: $T$53))

But the two sheests are on separate workbooks you should use SUMPRODUCT:

=SUMPRODUCT(([SourceWorkBook]Sheet2!$S$48:$S$53=A3)*([SourceWorkBook]Sheet2!$T$48:$T$53))

--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy


  #3   Report Post  
Posted to microsoft.public.excel.misc
Bondi
 
Posts: n/a
Default do i use vlookup or sumproduct???


Lazclark wrote:
I have these two sheets (as an example)

Sheet 1 :

.........A................ B........... C .........D
.....Product .........Total
.....Codes ..........sales
3 ..apples
4..pears
5 ..bananas

Sheet 2:


.............s...................t.............. u ...............v
............Product... Sales
............Codes
48 ......apples........ 20
49...... pears .........15
50..... bananas...... 23
51 ......apples .........8
52 .....apples .........13
53 ...bananas .........15

In column b on sheet 1, i wish to total the sales values - so for example
column b 3 i wish to add up ALL the sales of apples (20+8+13 =answer 41)....



What formula do i need to put in column b3 to achieve this?

many thanks



Hi,
One way would be to use SUMIF()... Something along the lines of this in
B3

=SUMIF(RangeOfProductsOnSheet2,"Apples",RangeOfSal esOnSheet2)

Regards,
Bondi

  #4   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default do i use vlookup or sumproduct???

=SUMIF(Sheet2!A:A,A3,Sheet2!B:B)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Lazclark" wrote in message
...
I have these two sheets (as an example)

Sheet 1 :

.........A................ B........... C .........D
.....Product .........Total
.....Codes ..........sales
3 ..apples
4..pears
5 ..bananas

Sheet 2:


.............s...................t.............. u ...............v
............Product... Sales
............Codes
48 ......apples........ 20
49...... pears .........15
50..... bananas...... 23
51 ......apples .........8
52 .....apples .........13
53 ...bananas .........15

In column b on sheet 1, i wish to total the sales values - so for example
column b 3 i wish to add up ALL the sales of apples (20+8+13 =answer

41)....

What formula do i need to put in column b3 to achieve this?

many thanks



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sumproduct and Vlookup Nav Excel Discussion (Misc queries) 9 December 4th 05 12:55 PM
Which SumProduct Sumif or VLookup? Dennis Excel Discussion (Misc queries) 2 September 26th 05 06:05 PM
VLOOKUP in SUMPRODUCT array KM01 Excel Worksheet Functions 3 September 14th 05 12:06 AM
I've tried Sumproduct, SumIf, Vlookup and Hlookup. Steved Excel Worksheet Functions 5 July 19th 05 11:46 PM
Sumproduct with a vLookup, multiple criteria Tom F Excel Worksheet Functions 3 May 6th 05 04:28 PM


All times are GMT +1. The time now is 12:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"