LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Calculating the average value with criteria

Hi group,
I hope someone can figure out a macro to do what I want.

The setup is as follows:
Cells B1:B5 contain numbers. Sometimes some of the cells may be empty.
Cells in the corresponding row, column A, (that include the text "girl" or
"boy" or "lady" shall not be represented in the average value
I want the average value of B1:B5 to be calculated in cell B6

Excample:

B1=2
B2 (empty)
B3=4
B4=7 (A4 contains the text "She is a nice girl". Therefore cell B4 shall not
be included in the average.
B5=9
______

In this case the calculated value in cell B6=5 ((2+4+9)/3)

Regards,
Kaj Pedersen

---
Denne e-mail blev kontrolleret for virusser af Avast antivirussoftware.
https://www.avast.com/antivirus

 
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
Calculating an average Maggie Excel Worksheet Functions 1 August 22nd 08 03:50 AM
Calculating an average using VBA Ben Excel Programming 2 August 2nd 07 09:26 PM
Calculating the average Andy_Trow Excel Discussion (Misc queries) 3 July 27th 07 02:15 PM
Calculating an average based on 2 and 3 criteria craggergirl Excel Worksheet Functions 2 February 24th 06 02:37 PM
calculating an average based on criteria scottwilsonx[_17_] Excel Programming 0 August 11th 04 02:38 PM


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