Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
lanceg
 
Posts: n/a
Default Summing values of corresponding columns


How can I retrieve the sum of only the values in column B, in which the
corresponding value in column A is equal some "search value" I
specify?

Example table
_A_|_B_
1 | 20
2 | 24
3 | 21
2 | 45
1 | 67
3 | 32
2 | 10
1 | 26

Desired answer if "search value" is 1: the sum of 20, 67, 26 ... which
is 113

I've been able to retrieve the first value, using VLOOKUP. But, I need
to somehow imbed the VLOOKUP function inside another function that
returns all the values - at least thats how I envision it.

Any help would be greatly appreciated. Thank you,
Lance G


--
lanceg
------------------------------------------------------------------------
lanceg's Profile: http://www.excelforum.com/member.php...o&userid=16097
View this thread: http://www.excelforum.com/showthread...hreadid=275452

  #2   Report Post  
Aladin Akyurek
 
Posts: n/a
Default


=SUMIF($A$2:$A$9,E2,$B$2:$B$9)

where E2 houses a condition like 1.

lanceg Wrote:
How can I retrieve the sum of only the values in column B, in which the
corresponding value in column A is equal some "search value" I
specify?

Example table
_A_|_B_
1 | 20
2 | 24
3 | 21
2 | 45
1 | 67
3 | 32
2 | 10
1 | 26

Desired answer if "search value" is 1: the sum of 20, 67, 26 ... which
is 113

I've been able to retrieve the first value, using VLOOKUP. But, I need
to somehow imbed the VLOOKUP function inside another function that
returns all the values - at least thats how I envision it.

Any help would be greatly appreciated. Thank you,
Lance G



--
Aladin Akyurek
------------------------------------------------------------------------
Aladin Akyurek's Profile: http://www.excelforum.com/member.php...fo&userid=4165
View this thread: http://www.excelforum.com/showthread...hreadid=275452

  #3   Report Post  
K.S.Warrier
 
Posts: n/a
Default

hi,
pl create a third column C and put the formula in C1 =if(A1=1,B1,0)
similarly in C2 =if(A2=1,B2,0) ; .....The sum of colum C will give you the
desired result.
K.S.Warrier

"Aladin Akyurek" wrote:


=SUMIF($A$2:$A$9,E2,$B$2:$B$9)

where E2 houses a condition like 1.

lanceg Wrote:
How can I retrieve the sum of only the values in column B, in which the
corresponding value in column A is equal some "search value" I
specify?

Example table
_A_|_B_
1 | 20
2 | 24
3 | 21
2 | 45
1 | 67
3 | 32
2 | 10
1 | 26

Desired answer if "search value" is 1: the sum of 20, 67, 26 ... which
is 113

I've been able to retrieve the first value, using VLOOKUP. But, I need
to somehow imbed the VLOOKUP function inside another function that
returns all the values - at least thats how I envision it.

Any help would be greatly appreciated. Thank you,
Lance G



--
Aladin Akyurek
------------------------------------------------------------------------
Aladin Akyurek's Profile: http://www.excelforum.com/member.php...fo&userid=4165
View this thread: http://www.excelforum.com/showthread...hreadid=275452


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
How do you find duplicate values in excel- 2 columns of numbers rickmanz Excel Discussion (Misc queries) 1 December 15th 04 11:16 PM
How do I get unique values from 2 columns? akmccarthy Excel Discussion (Misc queries) 2 December 13th 04 10:47 PM
Creating a chart with values from two columns Ivan Charts and Charting in Excel 2 December 12th 04 07:31 PM
Summing Values from different workbooks Harlan Grove Excel Discussion (Misc queries) 0 November 26th 04 07:38 PM
Need to sum values of columns 1 - 13 and 4 - 15 ExcelHelp Excel Worksheet Functions 1 October 27th 04 07:03 PM


All times are GMT +1. The time now is 06:31 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"