Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How Do I? Perform simplae Average on a indexed text location

My example is a column of unique text locations each with an average of how
oftern used next to each on in the ajoining column. Lets say its a column of
100 various animals. on Sheet 1
Animals Types Running Average
Tigers 4.5
Lions 2.25
Bears 3.6
Monkeys 10.4
Penguins 12.1
etc to 100

And each Zoo is presented on Sheet 2 (see below) with its columnar list of
animals and how many they have on-site. But each zoo (there are many) lists
their animals on Sheet 2 never ordered the same way as Sheet 1 compelling me
to devise a way to LOOKUP the LOCATION on Sheet 1 first, then perform the
average in sheet 1 second column. Also sheet 2 list is never 100 animals long
but a subset of sheet 1 list of animals.

Animals Types Exact Count
Tigers 4
Lions 2
Bears 3
Monkeys 10
Penguins 12
etc

So what functions to I use to continuosly update the running average for
each animal on sheet 1?

Thank you in advance - this is driving me crazy.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default How Do I? Perform simplae Average on a indexed text location

I had a bit of trouble understanding your message and current data structure.
----------------
My first suggestion would be to reorganise your data. It might be a bit of
work at first but you could then do some much more fancy stuff with it.

So if you had a single sheet with all your Data
Zoo Animal Quantity
London Elephant 3
London Giraffe 4
London Snake 5
NY Snake 2
NY Bear 1
Berlin Bear 4
Berlin Giraffe 6

you could then create a pivot table or a series of pivot tables like this
http://www.contextures.com/CreatePivotTable.html
------------------

Otherwise, I suggest you have a look at the help menu for SUMIF and COUNTIF.
In sheet 1 you could have
ColA ColB ColC
Row1 Animal Sum Count
Row2 Bear
Row3 Cow

The formula in B2 will be
=SUMIF(Sheet2!B:B,A2,Sheet2!C:C)
assuming on sheet 2 you have the animals in colB and the quantity thereof in
colC (you might have the zoo name in colA)
That will tell you the total number of each animal.

In C2 you will have
=COUNTIF(Sheet2!B:B,A2)
This will tell you the number of zoos that have the animal.

You can have another column to average them out.

--
Allllen


"Perplexed in Portland" wrote:

My example is a column of unique text locations each with an average of how
oftern used next to each on in the ajoining column. Lets say its a column of
100 various animals. on Sheet 1
Animals Types Running Average
Tigers 4.5
Lions 2.25
Bears 3.6
Monkeys 10.4
Penguins 12.1
etc to 100

And each Zoo is presented on Sheet 2 (see below) with its columnar list of
animals and how many they have on-site. But each zoo (there are many) lists
their animals on Sheet 2 never ordered the same way as Sheet 1 compelling me
to devise a way to LOOKUP the LOCATION on Sheet 1 first, then perform the
average in sheet 1 second column. Also sheet 2 list is never 100 animals long
but a subset of sheet 1 list of animals.

Animals Types Exact Count
Tigers 4
Lions 2
Bears 3
Monkeys 10
Penguins 12
etc

So what functions to I use to continuosly update the running average for
each animal on sheet 1?

Thank you in advance - this is driving me crazy.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default How Do I? Perform simplae Average on a indexed text location

Allllen......
1st - thank you for the reply
2nd - I will have to understand your answers so I will dig into the SUMIF an
COUNTIF functions and what thye do.
3rd - I have no way to change to the list of "animals" in my case since they
are fixed. But as I capture each zoo's own unique list which is only 10 items
total - they 1st have to be found in the master list then their number
averaged with all the rest.

I have my Excel manuals out looking at hoiw your answer will be applied.
Thanks again....

"Allllen" wrote:

I had a bit of trouble understanding your message and current data structure.
----------------
My first suggestion would be to reorganise your data. It might be a bit of
work at first but you could then do some much more fancy stuff with it.

So if you had a single sheet with all your Data
Zoo Animal Quantity
London Elephant 3
London Giraffe 4
London Snake 5
NY Snake 2
NY Bear 1
Berlin Bear 4
Berlin Giraffe 6

you could then create a pivot table or a series of pivot tables like this
http://www.contextures.com/CreatePivotTable.html
------------------

Otherwise, I suggest you have a look at the help menu for SUMIF and COUNTIF.
In sheet 1 you could have
ColA ColB ColC
Row1 Animal Sum Count
Row2 Bear
Row3 Cow

The formula in B2 will be
=SUMIF(Sheet2!B:B,A2,Sheet2!C:C)
assuming on sheet 2 you have the animals in colB and the quantity thereof in
colC (you might have the zoo name in colA)
That will tell you the total number of each animal.

In C2 you will have
=COUNTIF(Sheet2!B:B,A2)
This will tell you the number of zoos that have the animal.

You can have another column to average them out.

--
Allllen


"Perplexed in Portland" wrote:

My example is a column of unique text locations each with an average of how
oftern used next to each on in the ajoining column. Lets say its a column of
100 various animals. on Sheet 1
Animals Types Running Average
Tigers 4.5
Lions 2.25
Bears 3.6
Monkeys 10.4
Penguins 12.1
etc to 100

And each Zoo is presented on Sheet 2 (see below) with its columnar list of
animals and how many they have on-site. But each zoo (there are many) lists
their animals on Sheet 2 never ordered the same way as Sheet 1 compelling me
to devise a way to LOOKUP the LOCATION on Sheet 1 first, then perform the
average in sheet 1 second column. Also sheet 2 list is never 100 animals long
but a subset of sheet 1 list of animals.

Animals Types Exact Count
Tigers 4
Lions 2
Bears 3
Monkeys 10
Penguins 12
etc

So what functions to I use to continuosly update the running average for
each animal on sheet 1?

Thank you in advance - this is driving me crazy.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default How Do I? Perform simple Average on a indexed text location

Allllen.....
I tried your suggestions but they assume values are being pivoted or
operation is being performed resulting in SUMs or others things. In my case
my information is Indexed to a master list and the indvidual records I need
to extract the information are not ordered like the master list. I tried a
LOCATE and it returned a 1 (True) for the correct entry. Then I thought to do
a IF(Locate) is True perfrom an Average. But the LOCATE does not return the
LOCATION reference found.

Ex. I have 200 different Zoo records, and the Function must "find" the right
animal in the Master list before Averaging the previous number with the
current one. LOCATE only finds the right animal then I need to add one column
to its location to get to the running average column.

Hope this helps explain my data set a bit more. I tried re-orging the data
set but there is no way to create a pivot table. If it was then it would be
straight forward.

Still Perplexed in Portland

"Allllen" wrote:

I had a bit of trouble understanding your message and current data structure.
----------------
My first suggestion would be to reorganise your data. It might be a bit of
work at first but you could then do some much more fancy stuff with it.

So if you had a single sheet with all your Data
Zoo Animal Quantity
London Elephant 3
London Giraffe 4
London Snake 5
NY Snake 2
NY Bear 1
Berlin Bear 4
Berlin Giraffe 6

you could then create a pivot table or a series of pivot tables like this
http://www.contextures.com/CreatePivotTable.html
------------------

Otherwise, I suggest you have a look at the help menu for SUMIF and COUNTIF.
In sheet 1 you could have
ColA ColB ColC
Row1 Animal Sum Count
Row2 Bear
Row3 Cow

The formula in B2 will be
=SUMIF(Sheet2!B:B,A2,Sheet2!C:C)
assuming on sheet 2 you have the animals in colB and the quantity thereof in
colC (you might have the zoo name in colA)
That will tell you the total number of each animal.

In C2 you will have
=COUNTIF(Sheet2!B:B,A2)
This will tell you the number of zoos that have the animal.

You can have another column to average them out.

--
Allllen


"Perplexed in Portland" wrote:

My example is a column of unique text locations each with an average of how
oftern used next to each on in the ajoining column. Lets say its a column of
100 various animals. on Sheet 1
Animals Types Running Average
Tigers 4.5
Lions 2.25
Bears 3.6
Monkeys 10.4
Penguins 12.1
etc to 100

And each Zoo is presented on Sheet 2 (see below) with its columnar list of
animals and how many they have on-site. But each zoo (there are many) lists
their animals on Sheet 2 never ordered the same way as Sheet 1 compelling me
to devise a way to LOOKUP the LOCATION on Sheet 1 first, then perform the
average in sheet 1 second column. Also sheet 2 list is never 100 animals long
but a subset of sheet 1 list of animals.

Animals Types Exact Count
Tigers 4
Lions 2
Bears 3
Monkeys 10
Penguins 12
etc

So what functions to I use to continuosly update the running average for
each animal on sheet 1?

Thank you in advance - this is driving me crazy.

  #5   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default How Do I? Perform simple Average on a indexed text location

Here's another view & venture on your original post ...

Source data is assumed running in Sheet2's A2:B2 down,
eg:

Tigers 4
Lions 2
Bears 3
Lions 7
Bears 5
Tigers 9
etc

In Sheet1,
With the unique "animals", eg: Tigers, etc listed in A2 down
Paste this into B2, then press CTRL+SHIFT+ENTER to confirm the formula:
=AVERAGE(IF(Sheet2!A$2:A$100=A2,Sheet2!B$2:B$100))
Copy B2 down. Adapt the ranges to suit the actual extents of your data.

Success? High-five it, click the YES button below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default How Do I? Perform simple Average on a indexed text location

"Max"......
Actually.....I though you were on to something and it took me a whole day to
figure out that that metod returns a #Value since your Average is missing the
second term(number). So I messed around with it more and tried doing a
IF(Average), then a IF(EXACT) then Average. Finally got it so only the first
term would average based on the first indexed location. But it would not
"walk" down the rows to the next location......hmmmm

I really dont understand relative and absolute references - you know $
before or $ after.

Still thinking about what I though would be a simple problem......but is
twisting my brain.....
....PIP

"Max" wrote:

Here's another view & venture on your original post ...

Source data is assumed running in Sheet2's A2:B2 down,
eg:

Tigers 4
Lions 2
Bears 3
Lions 7
Bears 5
Tigers 9
etc

In Sheet1,
With the unique "animals", eg: Tigers, etc listed in A2 down
Paste this into B2, then press CTRL+SHIFT+ENTER to confirm the formula:
=AVERAGE(IF(Sheet2!A$2:A$100=A2,Sheet2!B$2:B$100))
Copy B2 down. Adapt the ranges to suit the actual extents of your data.

Success? High-five it, click the YES button below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---

  #7   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default How Do I? Perform simple Average on a indexed text location

.. returns a #Value since your Average is missing the second term(number)
No, it should work as advertised. If you get #value! errors, that means
you've got these errors somewhere in Sheet2's col B, which is supposed to
house only numbers. Do a check on your data, clear it up.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---
"Perplexed in Portland" wrote:
"Max"......
Actually.....I though you were on to something and it took me a whole day to
figure out that that metod returns a #Value since your Average is missing the
second term(number). So I messed around with it more and tried doing a
IF(Average), then a IF(EXACT) then Average. Finally got it so only the first
term would average based on the first indexed location. But it would not
"walk" down the rows to the next location......hmmmm

I really dont understand relative and absolute references - you know $
before or $ after.

Still thinking about what I though would be a simple problem......but is
twisting my brain.....
...PIP


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
how do I perform a conditional average with exclusions? Sandre Excel Discussion (Misc queries) 5 February 23rd 09 06:10 PM
Code to Look for Text and then Perform Specified Actions SeventhFloorProfessor Excel Discussion (Misc queries) 1 February 6th 09 03:14 PM
How do I perform multiple formating within a single line of text? TroyG Excel Worksheet Functions 2 October 13th 06 04:27 AM
how does one convert text to a formula "average(A:A)" to =average( phshirk Excel Worksheet Functions 4 April 14th 05 01:20 AM
indexed line chart? Xaver Hinterhuber Charts and Charting in Excel 1 February 23rd 05 02:39 AM


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