Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
jd jd is offline
external usenet poster
 
Posts: 91
Default averaging less than values

How do I average a column of numbers where less than values are calculated as
that number?

2
<2
3
4
<2
5

In the average I want the<2 to = 2. So the answer should be 3

-- JD
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Max Max is offline
external usenet poster
 
Posts: 9,221
Default averaging less than values

Assuming source data as posted in A2:A7

Paste this in say, B2,
then press CTRL+SHIFT+ENTER to array-enter the formula:
=AVERAGE(SUBSTITUTE(A2:A7,"<","")+0)

Adapt the ranges to suit
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:17,500 Files:358 Subscribers:55
xdemechanik
---
"JD" wrote:
How do I average a column of numbers where less than values are calculated as
that number?

2
<2
3
4
<2
5

In the average I want the<2 to = 2. So the answer should be 3

-- JD

  #3   Report Post  
Posted to microsoft.public.excel.newusers
Max Max is offline
external usenet poster
 
Posts: 9,221
Default averaging less than values

Paste this in say, B2,

should have read as:
Paste this in say, B2's formula bar


If you did the CTRL+SHIFT+ENTER confirmation (the "array-enter") properly,
you should see Excel wrap curly braces around the formula in the formula bar,
viz.:
{=AVERAGE(SUBSTITUTE(A2:A7,"<","")+0)}

If you don't see the curlies, just re-click inside the formula bar,
re-do the CTRL+SHIFT+ENTER confirmation
Then look again that the curlies are there

If the formula is not array-entered, it will not return the correct result
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:17,500 Files:358 Subscribers:55
xdemechanik
---
  #4   Report Post  
Posted to microsoft.public.excel.newusers
jd jd is offline
external usenet poster
 
Posts: 91
Default averaging less than values

It works if there are values in every cell of the column (A2:A7). What if
some cells do not have values to average?
--
JD


"Max" wrote:

Paste this in say, B2,


should have read as:
Paste this in say, B2's formula bar


If you did the CTRL+SHIFT+ENTER confirmation (the "array-enter") properly,
you should see Excel wrap curly braces around the formula in the formula bar,
viz.:
{=AVERAGE(SUBSTITUTE(A2:A7,"<","")+0)}

If you don't see the curlies, just re-click inside the formula bar,
re-do the CTRL+SHIFT+ENTER confirmation
Then look again that the curlies are there

If the formula is not array-entered, it will not return the correct result
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:17,500 Files:358 Subscribers:55
xdemechanik
---

  #5   Report Post  
Posted to microsoft.public.excel.newusers
Max Max is offline
external usenet poster
 
Posts: 9,221
Default averaging less than values

"JD" wrote:
It works if there are values in every cell of the column (A2:A7)


Ah, but wasn't that exactly what you showed in your posting?
Take a moment to press the "Yes" button in that response
(like the ones below)

What if some cells do not have values to average?


This should work, array-entered:
=AVERAGE(IF(A2:A7<"",SUBSTITUTE(A2:A7,"<","")+0))
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:17,500 Files:358 Subscribers:55
xdemechanik
---

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
Averaging all values for each hour??? Jennifer Excel Discussion (Misc queries) 12 March 30th 10 06:05 PM
Averaging last 25 non zero values. [email protected] Excel Discussion (Misc queries) 2 December 10th 07 02:16 PM
HELP: Averaging values if they meet certain criteria KellyF Excel Worksheet Functions 3 October 19th 07 02:15 PM
Averaging Values in Auto Filter Mr. Jan Park Excel Worksheet Functions 1 August 3rd 05 03:51 PM
Averaging selected values Hellion Excel Worksheet Functions 3 July 4th 05 03:29 AM


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