Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sage
 
Posts: n/a
Default Trying to get an IF/AND average to work

I'm trying to get this to only average specific information in column F that
contain "January" and "2005" in that particular row. If it doesn't match
January and 2005, it should return nothing.

=IF(AND('Period Data'!A10:A200="January",'Period
Data'!E10:E200=2005),AVERAGE('Period Data'!F10:F200),"")

It's averaging everything right now. I'm sure there's a better way to do
this, but it's beyond me at this point.

Thanks in advance,
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sage
 
Posts: n/a
Default Trying to get an IF/AND average to work

So I tried a different method here and still getting the same results. Here's
what I tried:

=AVERAGE(IF(AND('Period Data'!A10="January",'Period Data'!E10=2005),'Period
Data'!F10:F20))

It's still averaging everything in the F column rather then just those
particular rows that match January and 2005.

"Sage" wrote:

I'm trying to get this to only average specific information in column F that
contain "January" and "2005" in that particular row. If it doesn't match
January and 2005, it should return nothing.

=IF(AND('Period Data'!A10:A200="January",'Period
Data'!E10:E200=2005),AVERAGE('Period Data'!F10:F200),"")

It's averaging everything right now. I'm sure there's a better way to do
this, but it's beyond me at this point.

Thanks in advance,

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
SteveG
 
Posts: n/a
Default Trying to get an IF/AND average to work


Make sure you are entering your formula in as an array.

=AVERAGE(IF(Period Data!A1:A200="January",IF(Period
Data!E1:E200=2005,Period Data!F1:F200,FALSE)))

When you complete the formula, don't hit enter to commit, hit
Ctrl-Shift-Enter Simultaneously. This will create curly brackets
around the formula.

{=AVERAGE(IF(Period Data!A1:A200="January",IF(Period
Data!E1:E200=2005,Period Data!F1:F200,FALSE)))}

HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=502639

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sage
 
Posts: n/a
Default Trying to get an IF/AND average to work

That worked. Just had to add the ' around period data and the good 'ole
CTRL+Shift+Enter.

Thanks mate!

"SteveG" wrote:


Make sure you are entering your formula in as an array.

=AVERAGE(IF(Period Data!A1:A200="January",IF(Period
Data!E1:E200=2005,Period Data!F1:F200,FALSE)))

When you complete the formula, don't hit enter to commit, hit
Ctrl-Shift-Enter Simultaneously. This will create curly brackets
around the formula.

{=AVERAGE(IF(Period Data!A1:A200="January",IF(Period
Data!E1:E200=2005,Period Data!F1:F200,FALSE)))}

HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=502639


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
SteveG
 
Posts: n/a
Default Trying to get an IF/AND average to work


Anytime.

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=502639



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sage
 
Posts: n/a
Default Trying to get an IF/AND average to work

One more question if you're still around. How would I only average cells in
column F that contain information and ignore blank cells? As of now it's
bring my average down if there's a cell with nothing in it.

=AVERAGE(IF(Period Data!A1:A200="January",IF(Period Data!E1:E200=2005,Period
Data!F1:F200,FALSE)))

Thanks again!

Sage
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
SteveG
 
Posts: n/a
Default Trying to get an IF/AND average to work


This should do it for you.


=AVERAGE(IF(Period Data!A1:A200="January",IF(Period
Data!E1:E200=2005,IF(Period Data!F1:F200<"",Period
Data!F1:F200,FALSE))))

Again, it is an array formula.

HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=502639

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sage
 
Posts: n/a
Default Trying to get an IF/AND average to work

Care for a virtual beer? Cheers!

"SteveG" wrote:


This should do it for you.


=AVERAGE(IF(Period Data!A1:A200="January",IF(Period
Data!E1:E200=2005,IF(Period Data!F1:F200<"",Period
Data!F1:F200,FALSE))))

Again, it is an array formula.

HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=502639


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
Dates and Recomended Graphing Programs to work with excel? John Charts and Charting in Excel 2 December 8th 05 07:58 PM
A search for $ in a formula use to work now it does not work JuneJuly Excel Discussion (Misc queries) 2 November 30th 05 10:13 PM
Moving a sheet from one work book to another? WTG Excel Worksheet Functions 1 November 3rd 05 07:12 PM
My links no longer work . . . mike Excel Discussion (Misc queries) 8 October 27th 05 11:59 PM
How to get saved old saved work that was saved over? Maral Excel Discussion (Misc queries) 1 February 20th 05 08:59 PM


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