Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
americanenergy
 
Posts: n/a
Default Formula Help... Thanks Tom


Hi… I have a need for a formula that has me stumped… The first Colum is
user entry of products used per day with a entry total in row 33 from
the sum of 2 to 32 in column a. The second column is user entry for
broken (unusable product) for that day with a total in row 33 from the
sum of 2 to 32 in column b. The third column is the percentage of
unusable product verses total product per user entry (Example B2/A2)
with a total average percentage of broken product to usable product in
row 33 from the average of column c rows 2 thru 32. This was very
simple but now I need a cell to provide me with the percentage of broke
products for the last 1000 entries, not using any of the entered
information above 1000 products used…Any help would be much
appreciated… I hope you understand my gibberish…So what I am looking
for is no mater the QTY user entered I will get the % of broken product
for only the last 1000 products entered or up to the first 1000 products
entered in column A….Respectfully Tom


--
americanenergy
------------------------------------------------------------------------
americanenergy's Profile: http://www.excelforum.com/member.php...o&userid=30564
View this thread: http://www.excelforum.com/showthread...hreadid=502130

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Formula Help... Thanks Tom

I'm confused. If you only have products in ro2 2-32, how do average the
last 1000?

--

HTH

RP

"americanenergy"
<americanenergy.21sicz_1137519907.4604@excelforu m-nospam.com wrote in
message news:americanenergy.21sicz_1137519907.4604@excelfo rum-nospam.com...

Hi. I have a need for a formula that has me stumped. The first Colum is
user entry of products used per day with a entry total in row 33 from
the sum of 2 to 32 in column a. The second column is user entry for
broken (unusable product) for that day with a total in row 33 from the
sum of 2 to 32 in column b. The third column is the percentage of
unusable product verses total product per user entry (Example B2/A2)
with a total average percentage of broken product to usable product in
row 33 from the average of column c rows 2 thru 32. This was very
simple but now I need a cell to provide me with the percentage of broke
products for the last 1000 entries, not using any of the entered
information above 1000 products used.Any help would be much
appreciated. I hope you understand my gibberish.So what I am looking
for is no mater the QTY user entered I will get the % of broken product
for only the last 1000 products entered or up to the first 1000 products
entered in column A..Respectfully Tom


--
americanenergy
------------------------------------------------------------------------
americanenergy's Profile:

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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
msnews.microsoft.com
 
Posts: n/a
Default Formula Help... Thanks Tom

Tom:

I don't think it's possible without Macros because your idea suggests
conditional cell selection. It makes perfect sense, however it requires
some more logic than Excel will allow in formulas.

I'm not sure how to link a cell to a macro, I always use commandbuttons or
hotkey combinations to fire macros. If your description of your sheet was
accurate, this macro will give you your last 1000 average in a message box,
it could put it in a cell, but it wouldn't update automatically. You could
have the macro fire every time the sheet was changed I suppose.

Sub AvgLast1000()
Dim BrokenTotal, Count, RunningTotal As Integer

Count = 0
MsgBox "Row: " & ActiveCell.Row & ""

While RunningTotal < 1000 And ActiveCell.Row - Count 0
If ActiveSheet.Cells(ActiveCell.Row - Count, "A").Value 0 Then
BrokenTotal = BrokenTotal + ActiveSheet.Cells(ActiveCell.Row -
Count, "B").Value
RunningTotal = RunningTotal + ActiveSheet.Cells(ActiveCell.Row -
Count, "A").Value
End If
Count = Count + 1
Wend

If RunningTotal < 0 Then
MsgBox "Broken % for the last " & RunningTotal & " items: " &
BrokenTotal / RunningTotal
Else
MsgBox "Calculation not possible"
End If
End Sub

To add the macro, Tools Macros Visual Basic Editor
Then Insert Module
Then just cut and paste the subroutine.
Close Visual Basic Editor

To run, select a cell anywhere on the row for which you want to calculate
the previous 1000 products' brokenness.

ALT+F8
Run the AvgLast1000 macro.

It could also be linked to a hotkey from the ALT+F8 window under Options...

Then again, maybe you're not interested in using macros. ^.^

Thanks,
Tangent



"americanenergy"
<americanenergy.21sicz_1137519907.4604@excelforu m-nospam.com wrote in
message news:americanenergy.21sicz_1137519907.4604@excelfo rum-nospam.com...

Hi. I have a need for a formula that has me stumped. The first Colum is
user entry of products used per day with a entry total in row 33 from
the sum of 2 to 32 in column a. The second column is user entry for
broken (unusable product) for that day with a total in row 33 from the
sum of 2 to 32 in column b. The third column is the percentage of
unusable product verses total product per user entry (Example B2/A2)
with a total average percentage of broken product to usable product in
row 33 from the average of column c rows 2 thru 32. This was very
simple but now I need a cell to provide me with the percentage of broke
products for the last 1000 entries, not using any of the entered
information above 1000 products used.Any help would be much
appreciated. I hope you understand my gibberish.So what I am looking
for is no mater the QTY user entered I will get the % of broken product
for only the last 1000 products entered or up to the first 1000 products
entered in column A..Respectfully Tom


--
americanenergy
------------------------------------------------------------------------
americanenergy's Profile:
http://www.excelforum.com/member.php...o&userid=30564
View this thread: http://www.excelforum.com/showthread...hreadid=502130



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
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
Hide formula skateblade Excel Worksheet Functions 10 October 15th 05 08:36 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM
Help with macro formula and variable Huge project Excel Worksheet Functions 0 December 28th 04 01:27 AM


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