A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Function to Use when compare sums another column



 
 
Thread Tools Display Modes
  #1  
Old April 19th, 2010, 05:50 PM posted to microsoft.public.excel.worksheet.functions
Heather
external usenet poster
 
Posts: 360
Default Function to Use when compare sums another column

I have and age Field and a Column that contain counts.
If the aging Column contains a number between =0 and =30 I want it to sum
up the counts that correspond in field B2.

I tried the following and keep getting invalid returns.

=SUM(IF(MATCH("=30",Sheet2!F:F,0),INDEX(Sheet2!B: B,MATCH("=30",Sheet2!F:F)),0))
  #2  
Old April 19th, 2010, 05:57 PM posted to microsoft.public.excel.worksheet.functions
Dave Peterson
external usenet poster
 
Posts: 19,791
Default Function to Use when compare sums another column

One way...(I think)...

=sumif(a:a,"="&0,b:b) - sumif(a:a,""&30,b:b)



Heather wrote:

I have and age Field and a Column that contain counts.
If the aging Column contains a number between =0 and =30 I want it to sum
up the counts that correspond in field B2.

I tried the following and keep getting invalid returns.

=SUM(IF(MATCH("=30",Sheet2!F:F,0),INDEX(Sheet2!B: B,MATCH("=30",Sheet2!F:F)),0))


--

Dave Peterson
  #3  
Old April 19th, 2010, 06:05 PM posted to microsoft.public.excel.worksheet.functions
eduardo
external usenet poster
 
Posts: 2,131
Default Function to Use when compare sums another column

Hi,
try

=SUMPRODUCT(--(Sheet2!F1:F100),--(Sheet2!F1:F10=30))

change range to fit your needs

"Heather" wrote:

I have and age Field and a Column that contain counts.
If the aging Column contains a number between =0 and =30 I want it to sum
up the counts that correspond in field B2.

I tried the following and keep getting invalid returns.

=SUM(IF(MATCH("=30",Sheet2!F:F,0),INDEX(Sheet2!B: B,MATCH("=30",Sheet2!F:F)),0))

  #4  
Old April 19th, 2010, 06:11 PM posted to microsoft.public.excel.worksheet.functions
Bernard Liengme
external usenet poster
 
Posts: 516
Default Function to Use when compare sums another column

=SUMPRODUCT(--(Sheet2!F1:F1000=0),(--(Sheet2!F1:F1000=30),
Sheet2!B1:B1000)
You cannot use full column references with SUMPRODUCT except in Excel 2007+
And if you have Exel2007 then you could use
=SUMIFS(Sheet2!B:B,Sheet2!F:F,"=0",Sheet2!F:F,"= 30")
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"Heather" wrote in message
...
I have and age Field and a Column that contain counts.
If the aging Column contains a number between =0 and =30 I want it to
sum
up the counts that correspond in field B2.

I tried the following and keep getting invalid returns.

=SUM(IF(MATCH("=30",Sheet2!F:F,0),INDEX(Sheet2!B: B,MATCH("=30",Sheet2!F:F)),0))


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:43 PM.


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