Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 33
Default IF statements with multiple criteria

I have a worksheet that has 4 columns. The information is populated based on
months with the last column for the quarter information.

for example:

Col K Col L Col M Col N

46% 0% 0% Average of the three columns K-M

My problem is since columns L and M have no data to calculate the
percentage, I need a formula that will calculate the Average. However, if
Col K has a value and L and M have 0% then return value in col K. However,
If K and L had values average K&L and should all three columns have values
average all three in column N.

So, At this point the Average should be 46%. If the the first column is
46% and column M is 43% then Colunm N should be 45%, and so on. At this
point the average is being calculated as if there are values in all three
columns. The formular creates an average of 15%.

I'm unsure how to nest the if statement, if that's the proper way to get to
what I want.

Any help would be great!

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,069
Default IF statements with multiple criteria

Try this

=IF(SUM(K1:M1)=0,0,SUM(K1:M1)/COUNTIF(K1:M1,"<0"))

Hope this helps,

Hutch

"LWilson" wrote:

I have a worksheet that has 4 columns. The information is populated based on
months with the last column for the quarter information.

for example:

Col K Col L Col M Col N

46% 0% 0% Average of the three columns K-M

My problem is since columns L and M have no data to calculate the
percentage, I need a formula that will calculate the Average. However, if
Col K has a value and L and M have 0% then return value in col K. However,
If K and L had values average K&L and should all three columns have values
average all three in column N.

So, At this point the Average should be 46%. If the the first column is
46% and column M is 43% then Colunm N should be 45%, and so on. At this
point the average is being calculated as if there are values in all three
columns. The formular creates an average of 15%.

I'm unsure how to nest the if statement, if that's the proper way to get to
what I want.

Any help would be great!

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 33
Default IF statements with multiple criteria

Perfect!! Thank you! Works like a charm!!


"Tom Hutchins" wrote:

Try this

=IF(SUM(K1:M1)=0,0,SUM(K1:M1)/COUNTIF(K1:M1,"<0"))

Hope this helps,

Hutch

"LWilson" wrote:

I have a worksheet that has 4 columns. The information is populated based on
months with the last column for the quarter information.

for example:

Col K Col L Col M Col N

46% 0% 0% Average of the three columns K-M

My problem is since columns L and M have no data to calculate the
percentage, I need a formula that will calculate the Average. However, if
Col K has a value and L and M have 0% then return value in col K. However,
If K and L had values average K&L and should all three columns have values
average all three in column N.

So, At this point the Average should be 46%. If the the first column is
46% and column M is 43% then Colunm N should be 45%, and so on. At this
point the average is being calculated as if there are values in all three
columns. The formular creates an average of 15%.

I'm unsure how to nest the if statement, if that's the proper way to get to
what I want.

Any help would be great!

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
Multiple criteria IF statements? Eán[_2_] Excel Worksheet Functions 2 April 9th 09 09:59 AM
Selectively replace cells based on two ranges of criteria - nestedIF() statements? MCSmarties Excel Discussion (Misc queries) 1 May 21st 08 09:49 PM
match multiple criteria ina range from multiple criteria multiplet RG Excel Worksheet Functions 8 September 28th 07 04:21 AM
Counting Cells with multiple criteria.One criteria supporting wild Azhar Saleem Excel Worksheet Functions 1 January 12th 05 10:54 AM
Counting Cells with multiple criteria.One criteria supporting wild Azhar Arain Excel Worksheet Functions 1 January 12th 05 08:33 AM


All times are GMT +1. The time now is 08:45 PM.

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"