=If(LEN... formula

apurk45

Board Regular
Joined
Oct 23, 2002
Messages
224
Office Version
  1. 2021
Platform
  1. Windows
Here is the formula I'm trying to use:

=IF((LEN(S4:S6)=0,""),(LEN(S4:S6)>0,AVERAGE(S4:S6)))

Unfortunately, I am getting error message " There is a problem with this formula". Do you see anything that I need to change?

Your advise will be greatly appreciated
 
Last edited:

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
What version of excel are you using
 
Upvote 0
Hi,

Since you're trying to AVERAGE S4:S6, I assume you're dealing with numbers, try this:

=IF(COUNT(S4:S6),AVERAGE(S4:S6),"")
 
Upvote 0
Try =AVERAGEIF(S4:S6,”<>0”)
 
Upvote 0
I think this is what you are trying to achieve:

=IF(COUNT(S4:S6)=0,"",AVERAGE(S4:S6))
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,159
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top