#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 29
Default average in excle

I'm raking my brains...I have a table where column A has job titles,
column B has the salary. Column A has duplicate job titles, which is
OK, what I'm looking for is an average function that will give me the
average salary per job title. I know I could do this via a pivot
table but I was planning on using vlookup and/or average. I'm just
not getting the syntax correct. Any help?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default average in excle


=SUMPRODUCT(--(A2:A100=Job),B2:B100))/SUMPRODUCT(--(A2:A100=Job)

=SUMIF(A2:A100,job,B2:B100)/COUNTIF(A2:A100,job)

where Job is Job Title (text) OR cell containing Job Title

" wrote:

I'm raking my brains...I have a table where column A has job titles,
column B has the salary. Column A has duplicate job titles, which is
OK, what I'm looking for is an average function that will give me the
average salary per job title. I know I could do this via a pivot
table but I was planning on using vlookup and/or average. I'm just
not getting the syntax correct. Any help?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default average in excle

=AVERAGE(IF(A2:A100=Job),B2:B100))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets), do
not try to do this manually.
When editing the formula, it must again be array-entered.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Toppers" wrote in message
...

=SUMPRODUCT(--(A2:A100=Job),B2:B100))/SUMPRODUCT(--(A2:A100=Job)

=SUMIF(A2:A100,job,B2:B100)/COUNTIF(A2:A100,job)

where Job is Job Title (text) OR cell containing Job Title

" wrote:

I'm raking my brains...I have a table where column A has job titles,
column B has the salary. Column A has duplicate job titles, which is
OK, what I'm looking for is an average function that will give me the
average salary per job title. I know I could do this via a pivot
table but I was planning on using vlookup and/or average. I'm just
not getting the syntax correct. Any help?




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bj bj is offline
external usenet poster
 
Posts: 1,397
Default average in excle

or
=average(if(A:A=Job_title,B:B)
entered as array control-shift-enter

" wrote:

I'm raking my brains...I have a table where column A has job titles,
column B has the salary. Column A has duplicate job titles, which is
OK, what I'm looking for is an average function that will give me the
average salary per job title. I know I could do this via a pivot
table but I was planning on using vlookup and/or average. I'm just
not getting the syntax correct. Any help?


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 146
Default average in excle

An AVERAGEIF function may help you. Example: A1:A100 contains the job titles
with duplicates, B1:B100 contains the salaries. You could put all of the job
titles in column C starting with C1, just once, no duplicates, sort them
alphabetically. Then in column D1 put the formula
=AVERAGEIF(A1:A100,C1,B1:B100) and drag the formula down so that there is a
formula in each cell in column D for every entry in column C. You will get a
"Formula omits adjacent cells error" for the formulas. Just clear the error
as it's meaningless in this case.
..


wrote in message
ps.com...
I'm raking my brains...I have a table where column A has job titles,
column B has the salary. Column A has duplicate job titles, which is
OK, what I'm looking for is an average function that will give me the
average salary per job title. I know I could do this via a pivot
table but I was planning on using vlookup and/or average. I'm just
not getting the syntax correct. Any help?





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 146
Default average in excle

An AVERAGEIF function may help you. Example: A1:A100 contains the job titles
with duplicates, B1:B100 contains the salaries. You could put all of the job
titles in column C starting with C1, just once, no duplicates, sort them
alphabetically. Then in column D1 put the formula
=AVERAGEIF($A$1:$A$100,C1,$B$1:$B$100) and drag the formula down so that
there is a
formula in each cell in column D for every entry in column C. You will get a
"Formula omits adjacent cells error" for the formulas. Just clear the error
as it's meaningless in this case.

"Dave Thomas" wrote in message
et...
An AVERAGEIF function may help you. Example: A1:A100 contains the job
titles with duplicates, B1:B100 contains the salaries. You could put all
of the job titles in column C starting with C1, just once, no duplicates,
sort them alphabetically. Then in column D1 put the formula
=AVERAGEIF(A1:A100,C1,B1:B100) and drag the formula down so that there is
a formula in each cell in column D for every entry in column C. You will
get a "Formula omits adjacent cells error" for the formulas. Just clear
the error as it's meaningless in this case.
.


wrote in message
ps.com...
I'm raking my brains...I have a table where column A has job titles,
column B has the salary. Column A has duplicate job titles, which is
OK, what I'm looking for is an average function that will give me the
average salary per job title. I know I could do this via a pivot
table but I was planning on using vlookup and/or average. I'm just
not getting the syntax correct. Any help?





  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 146
Default Correction to original post.

The addresses in columns A and B have to be absolute.

An AVERAGEIF function may help you. Example: A1:A100 contains the job titles
with duplicates, B1:B100 contains the salaries. You could put all of the job
titles in column C starting with C1, just once, no duplicates, sort them
alphabetically. Then in column D1 put the formula
=AVERAGEIF($A$1:$A$100,C1,$B$1:$B$100) and drag the formula down so that
there is a
formula in each cell in column D for every entry in column C. You will get a
"Formula omits adjacent cells error" for the formulas. Just clear the error
as it's meaningless in this case.


"Dave Thomas" wrote in message
et...
An AVERAGEIF function may help you. Example: A1:A100 contains the job
titles with duplicates, B1:B100 contains the salaries. You could put all
of the job titles in column C starting with C1, just once, no duplicates,
sort them alphabetically. Then in column D1 put the formula
=AVERAGEIF(A1:A100,C1,B1:B100) and drag the formula down so that there is
a formula in each cell in column D for every entry in column C. You will
get a "Formula omits adjacent cells error" for the formulas. Just clear
the error as it's meaningless in this case.
.


wrote in message
ps.com...
I'm raking my brains...I have a table where column A has job titles,
column B has the salary. Column A has duplicate job titles, which is
OK, what I'm looking for is an average function that will give me the
average salary per job title. I know I could do this via a pivot
table but I was planning on using vlookup and/or average. I'm just
not getting the syntax correct. Any help?





  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Correction to original post.

AVERAGEIF is only for Excel 2007




--
Regards,

Peo Sjoblom



"Dave Thomas" wrote in message
. net...
The addresses in columns A and B have to be absolute.

An AVERAGEIF function may help you. Example: A1:A100 contains the job
titles
with duplicates, B1:B100 contains the salaries. You could put all of the
job
titles in column C starting with C1, just once, no duplicates, sort them
alphabetically. Then in column D1 put the formula
=AVERAGEIF($A$1:$A$100,C1,$B$1:$B$100) and drag the formula down so that
there is a
formula in each cell in column D for every entry in column C. You will get
a
"Formula omits adjacent cells error" for the formulas. Just clear the
error
as it's meaningless in this case.


"Dave Thomas" wrote in message
et...
An AVERAGEIF function may help you. Example: A1:A100 contains the job
titles with duplicates, B1:B100 contains the salaries. You could put all
of the job titles in column C starting with C1, just once, no duplicates,
sort them alphabetically. Then in column D1 put the formula
=AVERAGEIF(A1:A100,C1,B1:B100) and drag the formula down so that there is
a formula in each cell in column D for every entry in column C. You will
get a "Formula omits adjacent cells error" for the formulas. Just clear
the error as it's meaningless in this case.
.


wrote in message
ps.com...
I'm raking my brains...I have a table where column A has job titles,
column B has the salary. Column A has duplicate job titles, which is
OK, what I'm looking for is an average function that will give me the
average salary per job title. I know I could do this via a pivot
table but I was planning on using vlookup and/or average. I'm just
not getting the syntax correct. Any help?







  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Correction to original post.


"Peo Sjoblom" wrote in message
...
AVERAGEIF is only for Excel 2007


no matter how many times he says it ...


  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 146
Default average in excle - works in 2007 and prior.

An AVERAGE function may help you. Example: A1:A100 contains the job titles
with duplicates, B1:B100 contains the salaries. You could put all of the job
titles in column C starting with C1, just once, no duplicates, sort them
alphabetically. Then in column D1 put the formula
=AVERAGE(IF(C1=$A$1:$A$10,$B$1:$B$10)) and press CRTL+SHIFT+ENTER
to enter the formula as an array formula and drag the formula down so that
there is formula in each cell in column D for every entry in column C.


wrote in message
ps.com...
I'm raking my brains...I have a table where column A has job titles,
column B has the salary. Column A has duplicate job titles, which is
OK, what I'm looking for is an average function that will give me the
average salary per job title. I know I could do this via a pivot
table but I was planning on using vlookup and/or average. I'm just
not getting the syntax correct. Any help?





  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 146
Default average in excle - works in 2007 and prior - Address correction


"Dave Thomas" wrote in message
. net...
An AVERAGE function may help you. Example: A1:A100 contains the job titles
with duplicates, B1:B100 contains the salaries. You could put all of the
job
titles in column C starting with C1, just once, no duplicates, sort them
alphabetically. Then in column D1 put the formula
=AVERAGE(IF(C1=$A$1:$A$100,$B$1:$B$100)) and press CRTL+SHIFT+ENTER
to enter the formula as an array formula and drag the formula down so
that
there is formula in each cell in column D for every entry in column C.


wrote in message
ps.com...
I'm raking my brains...I have a table where column A has job titles,
column B has the salary. Column A has duplicate job titles, which is
OK, what I'm looking for is an average function that will give me the
average salary per job title. I know I could do this via a pivot
table but I was planning on using vlookup and/or average. I'm just
not getting the syntax correct. Any help?





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
why ctrl+ home is not working in excle 2003? bellisima Excel Discussion (Misc queries) 1 October 25th 06 08:30 PM
calendar control excle 2003 sreenivas reddy Excel Worksheet Functions 1 August 16th 06 01:58 PM
How do I set up Auto sequence number in excle Nassir Charts and Charting in Excel 0 June 8th 06 08:09 PM
Excle should allow define a fix exponent in scientific notation Gamaliel Excel Discussion (Misc queries) 1 May 16th 06 06:15 PM
help in excle setting neelkamalgupta New Users to Excel 1 February 13th 06 08:57 PM


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