Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Default Using VLOOKUP to Sum values from multiple columns

I am trying to use VLOOKUP to sum multiple values from different columns. I need this because the value is given by name of machine, and in the column directly right of that the cost is given. The table looks like this.
2010 2011
A B C D
M086-1 7000 M105 10000
M105 5000 F120 9200
F120 2500 M086-1 7600
F102 1500 F102 5500

It goes on like this for a list of around 100 machines, and there are about 8 columns.
So i need to sum the values for each machine over these columns.
Say for instance i want to get the total for M105 over these two years, i have been using:

=SUMPRODUCT(VLOOKUP("M105",$A$3:$D$6,{2,4},FALSE))

Then hitting ctrl+shift+enter

This gives me an incorrect value though...

EDIT:

Used SUM and SUMIF to specify machine and that is working much better than previous formula.

Last edited by Askyou : March 15th 12 at 03:14 PM
  #2   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by Askyou View Post
I am trying to use VLOOKUP to sum multiple values from different columns. I need this because the value is given by name of machine, and in the column directly right of that the cost is given. The table looks like this.
2010 2011
A B C D
M086-1 7000 M105 10000
M105 5000 F120 9200
F120 2500 M086-1 7600
F102 1500 F102 5500

It goes on like this for a list of around 100 machines, and there are about 8 columns.
So i need to sum the values for each machine over these columns.
Say for instance i want to get the total for M105 over these two years, i have been using:

=SUMPRODUCT(VLOOKUP("M105",$A$3:$D$6,{2,4},FALSE))

Then hitting ctrl+shift+enter

This gives me an incorrect value though...

EDIT:

Used SUM and SUMIF to specify machine and that is working much better than previous formula.

Hi,

Easily done using just =SUMPRODUCT if you still need help.

Email me your current workbook or PM me if you need a contact email address and I'll happily show you how.

I need to see more of the data to make it actually work, so easier to see your workbook than give half a reply here.

S.
  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 143
Default Using VLOOKUP to Sum values from multiple columns

No VLOOKUP()s or arrray formulae are needed:

=SUMPRODUCT(--(A3:A6="M105")*(B3:B6))+SUMPRODUCT(--(C3:C6="M105")*(D3:D6))
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
VLookup multiple values - sum returned values into single cell se7098 Excel Worksheet Functions 12 April 2nd 23 07:32 PM
Sum multiple vlookup returns across multiple columns not_so_pro Excel Worksheet Functions 2 February 26th 10 05:58 PM
Vlookup multiple criteria multiple occurrences sum values se7098 Excel Worksheet Functions 0 March 26th 09 07:31 PM
Lookup in Multiple Columns, Return Multiple Values andy62 Excel Worksheet Functions 3 July 6th 06 02:36 AM
vlookup, multiple values, sum values into one cell?? Phillips L Excel Worksheet Functions 4 November 9th 05 12:31 AM


All times are GMT +1. The time now is 07:24 AM.

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

About Us

"It's about Microsoft Excel"