Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
Sterling
 
Posts: n/a
Default need help coming up with a formula.


I know just enough in Excel that I know I can get the info I want but
not enough to know how to do it. Any help would be much appreciated. I
am working with 2 columns of data, for example:

Days in Stock____________Cost

2_____________________$300
21____________________$400
117___________________$600
8_____________________$400
37____________________$500
78____________________$500

What I want to calculate is the average cost for 0-10 days in stock
(($300 + $400)/2= $350), the average cost for 11-60 days in stock, and
the average cost for 60+ days in stock.

What sort of formula would best calculate this? TIA.


--
Sterling
------------------------------------------------------------------------
Sterling's Profile: http://www.excelforum.com/member.php...o&userid=29554
View this thread: http://www.excelforum.com/showthread...hreadid=492585

  #2   Report Post  
Posted to microsoft.public.excel.newusers
JE McGimpsey
 
Posts: n/a
Default need help coming up with a formula.

One way:

=SUMIF(A:A,"<=10",B:B)/COUNTIF(A:A,"<=10")


In article ,
Sterling
wrote:

I know just enough in Excel that I know I can get the info I want but
not enough to know how to do it. Any help would be much appreciated. I
am working with 2 columns of data, for example:

Days in Stock____________Cost

2_____________________$300
21____________________$400
117___________________$600
8_____________________$400
37____________________$500
78____________________$500

What I want to calculate is the average cost for 0-10 days in stock
(($300 + $400)/2= $350), the average cost for 11-60 days in stock, and
the average cost for 60+ days in stock.

What sort of formula would best calculate this? TIA.

  #3   Report Post  
Posted to microsoft.public.excel.newusers
Bob Phillips
 
Posts: n/a
Default need help coming up with a formula.

=AVERAGE(IF((A1:A200)*(A1:A20<=10),B1:B20))

as an array formula, so commit with Ctrl-Shift-Enter.

Just change the 0 and the 10 for other ranges.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Sterling" wrote in
message ...

I know just enough in Excel that I know I can get the info I want but
not enough to know how to do it. Any help would be much appreciated. I
am working with 2 columns of data, for example:

Days in Stock____________Cost

2_____________________$300
21____________________$400
117___________________$600
8_____________________$400
37____________________$500
78____________________$500

What I want to calculate is the average cost for 0-10 days in stock
(($300 + $400)/2= $350), the average cost for 11-60 days in stock, and
the average cost for 60+ days in stock.

What sort of formula would best calculate this? TIA.


--
Sterling
------------------------------------------------------------------------
Sterling's Profile:

http://www.excelforum.com/member.php...o&userid=29554
View this thread: http://www.excelforum.com/showthread...hreadid=492585



  #4   Report Post  
Posted to microsoft.public.excel.newusers
Ron Coderre
 
Posts: n/a
Default need help coming up with a formula.

Try this:
If your data is in Cells A1:B7

C1: From
D1: Thru
E1: AvgCost
C2: 0
D2: 10

C3: 11
D3: 60

C4: 61
D4: 1000

E2: =AVERAGE(IF(--($A$2:$A$7=C2)*($A$2:$A$7<=D2),$B$2:$B$7))
Copy that formula down

Is that what you're looking for?

***********
Regards,
Ron


"Sterling" wrote:


I know just enough in Excel that I know I can get the info I want but
not enough to know how to do it. Any help would be much appreciated. I
am working with 2 columns of data, for example:

Days in Stock____________Cost

2_____________________$300
21____________________$400
117___________________$600
8_____________________$400
37____________________$500
78____________________$500

What I want to calculate is the average cost for 0-10 days in stock
(($300 + $400)/2= $350), the average cost for 11-60 days in stock, and
the average cost for 60+ days in stock.

What sort of formula would best calculate this? TIA.


--
Sterling
------------------------------------------------------------------------
Sterling's Profile: http://www.excelforum.com/member.php...o&userid=29554
View this thread: http://www.excelforum.com/showthread...hreadid=492585


  #5   Report Post  
Posted to microsoft.public.excel.newusers
Ron Coderre
 
Posts: n/a
Default Important addition: [Ctrl]+[Shift]+[Enter]

For
E2: =AVERAGE(IF(--($A$2:$A$7=C2)*($A$2:$A$7<=D2),$B$2:$B$7))

You need to commit that array formula by holding down the [Ctrl] and [Shift]
keys when you press [Enter].

***********
Regards,
Ron


"Ron Coderre" wrote:

Try this:
If your data is in Cells A1:B7

C1: From
D1: Thru
E1: AvgCost
C2: 0
D2: 10

C3: 11
D3: 60

C4: 61
D4: 1000

E2: =AVERAGE(IF(--($A$2:$A$7=C2)*($A$2:$A$7<=D2),$B$2:$B$7))
Copy that formula down

Is that what you're looking for?

***********
Regards,
Ron


"Sterling" wrote:


I know just enough in Excel that I know I can get the info I want but
not enough to know how to do it. Any help would be much appreciated. I
am working with 2 columns of data, for example:

Days in Stock____________Cost

2_____________________$300
21____________________$400
117___________________$600
8_____________________$400
37____________________$500
78____________________$500

What I want to calculate is the average cost for 0-10 days in stock
(($300 + $400)/2= $350), the average cost for 11-60 days in stock, and
the average cost for 60+ days in stock.

What sort of formula would best calculate this? TIA.


--
Sterling
------------------------------------------------------------------------
Sterling's Profile: http://www.excelforum.com/member.php...o&userid=29554
View this thread: http://www.excelforum.com/showthread...hreadid=492585




  #6   Report Post  
Posted to microsoft.public.excel.newusers
Sterling
 
Posts: n/a
Default need help coming up with a formula.


Wow that was fast. And just what I needed. Thank you all for the help.:)


--
Sterling
------------------------------------------------------------------------
Sterling's Profile: http://www.excelforum.com/member.php...o&userid=29554
View this thread: http://www.excelforum.com/showthread...hreadid=492585

  #7   Report Post  
Posted to microsoft.public.excel.newusers
Sterling
 
Posts: n/a
Default need help coming up with a formula.


One more question if I may:

I've used this formula and it works great:

=AVERAGE(IF((A1:A200)*(A1:A20<=10),B1:B20))

Now, how do I incorporate a second set of data say in columns C and D.
For example, the first set of data, as I posted, would be for cars and
the second set would be for trucks. Using the above formula I can find
out the average cost for 0-10 day cars and 0-10 day trucks. How would I
set up the formula to come up with 0-10 day -vehicles-?

TIA again.


--
Sterling
------------------------------------------------------------------------
Sterling's Profile: http://www.excelforum.com/member.php...o&userid=29554
View this thread: http://www.excelforum.com/showthread...hreadid=492585

  #8   Report Post  
Posted to microsoft.public.excel.newusers
Bob Phillips
 
Posts: n/a
Default need help coming up with a formula.

One way

=(SUMPRODUCT(--(A1:A200),--(A1:A20<=10),B1:B20)+SUMPRODUCT(--(C1:C200),--(
C1:C20<=10),D1:D20))/(SUMPRODUCT(--(A1:A200),--(A1:A20<=10))+SUMPRODUCT(--(
C1:C200),--(C1:C20<=10)))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Sterling" wrote in
message ...

One more question if I may:

I've used this formula and it works great:

=AVERAGE(IF((A1:A200)*(A1:A20<=10),B1:B20))

Now, how do I incorporate a second set of data say in columns C and D.
For example, the first set of data, as I posted, would be for cars and
the second set would be for trucks. Using the above formula I can find
out the average cost for 0-10 day cars and 0-10 day trucks. How would I
set up the formula to come up with 0-10 day -vehicles-?

TIA again.


--
Sterling
------------------------------------------------------------------------
Sterling's Profile:

http://www.excelforum.com/member.php...o&userid=29554
View this thread: http://www.excelforum.com/showthread...hreadid=492585



  #9   Report Post  
Posted to microsoft.public.excel.newusers
Sterling
 
Posts: n/a
Default need help coming up with a formula.


Thank you. That formula worked great.


--
Sterling
------------------------------------------------------------------------
Sterling's Profile: http://www.excelforum.com/member.php...o&userid=29554
View this thread: http://www.excelforum.com/showthread...hreadid=492585

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
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
New user needing help with coming up with a formula Igniter New Users to Excel 2 June 2nd 05 07:10 PM
IF & VLOOKUP FORMULA taxmom Excel Worksheet Functions 3 March 2nd 05 03:35 PM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM


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