Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have a array of numbers set up I need to find the "last" time a particular
number shows up. i.e. the last time that part number sold. Column A contains the week number. The cells in columns B to G contain the part numbers that sold that week. What I need is if in week 32 was the last time part number 2356 sold. I need a function that will return the 32 with out looking through the list manually. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=MAX(IF(B$1:B$100=2356,$A$1:$A$100))
Array Entered (Ctrl + Shift + Enter) "scidoc" wrote in message ... I have a array of numbers set up I need to find the "last" time a particular number shows up. i.e. the last time that part number sold. Column A contains the week number. The cells in columns B to G contain the part numbers that sold that week. What I need is if in week 32 was the last time part number 2356 sold. I need a function that will return the 32 with out looking through the list manually. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Assuming you have only one years's data (i.e., 52 weeks), should be
=MAX(IF(B$1:G$52=2356,$A$1:$A$52) Perhaps better still =MAX(IF(B$1:G$52=H1,$A$1:$A$52) with the part number in H1. Alan Beban - wrote: =MAX(IF(B$1:B$100=2356,$A$1:$A$100)) Array Entered (Ctrl + Shift + Enter) "scidoc" wrote in message ... I have a array of numbers set up I need to find the "last" time a particular number shows up. i.e. the last time that part number sold. Column A contains the week number. The cells in columns B to G contain the part numbers that sold that week. What I need is if in week 32 was the last time part number 2356 sold. I need a function that will return the 32 with out looking through the list manually. |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I've tried both formulas, all they give me is 0.
I've tried the IF function alone when there is only one occurence of 2356 in the array B1:G52 and all I get is a false unless the I put the formula in the same row as the occurence of 2356. Then it returns the vaule in the A1:A52 just like its susposed to. Could it be my version can't do ranges in the IF function??? I'm using excel 2000 9.0.8961 SP-3. "Alan Beban" wrote: Assuming you have only one years's data (i.e., 52 weeks), should be =MAX(IF(B$1:G$52=2356,$A$1:$A$52) Perhaps better still =MAX(IF(B$1:G$52=H1,$A$1:$A$52) with the part number in H1. Alan Beban - wrote: =MAX(IF(B$1:B$100=2356,$A$1:$A$100)) Array Entered (Ctrl + Shift + Enter) "scidoc" wrote in message ... I have a array of numbers set up I need to find the "last" time a particular number shows up. i.e. the last time that part number sold. Column A contains the week number. The cells in columns B to G contain the part numbers that sold that week. What I need is if in week 32 was the last time part number 2356 sold. I need a function that will return the 32 with out looking through the list manually. |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Array Entered (Ctrl + Shift + Enter)
means this: This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it correctly, excel will wrap curly brackets {} around your formula. (don't type them yourself.) scidoc wrote: I've tried both formulas, all they give me is 0. I've tried the IF function alone when there is only one occurence of 2356 in the array B1:G52 and all I get is a false unless the I put the formula in the same row as the occurence of 2356. Then it returns the vaule in the A1:A52 just like its susposed to. Could it be my version can't do ranges in the IF function??? I'm using excel 2000 9.0.8961 SP-3. "Alan Beban" wrote: Assuming you have only one years's data (i.e., 52 weeks), should be =MAX(IF(B$1:G$52=2356,$A$1:$A$52) Perhaps better still =MAX(IF(B$1:G$52=H1,$A$1:$A$52) with the part number in H1. Alan Beban - wrote: =MAX(IF(B$1:B$100=2356,$A$1:$A$100)) Array Entered (Ctrl + Shift + Enter) "scidoc" wrote in message ... I have a array of numbers set up I need to find the "last" time a particular number shows up. i.e. the last time that part number sold. Column A contains the week number. The cells in columns B to G contain the part numbers that sold that week. What I need is if in week 32 was the last time part number 2356 sold. I need a function that will return the 32 with out looking through the list manually. -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Did you note the requirement to press Ctrl+Shift+Enter to "enter" the
formula? If not, select the cell with the formula, then click **in** the formula bar (the cursor must be in the formula bar for this to work) and press Crtl+Shift+Enter. That should make the formula work correctly for you. Rick "scidoc" wrote in message ... I've tried both formulas, all they give me is 0. I've tried the IF function alone when there is only one occurence of 2356 in the array B1:G52 and all I get is a false unless the I put the formula in the same row as the occurence of 2356. Then it returns the vaule in the A1:A52 just like its susposed to. Could it be my version can't do ranges in the IF function??? I'm using excel 2000 9.0.8961 SP-3. "Alan Beban" wrote: Assuming you have only one years's data (i.e., 52 weeks), should be =MAX(IF(B$1:G$52=2356,$A$1:$A$52) Perhaps better still =MAX(IF(B$1:G$52=H1,$A$1:$A$52) with the part number in H1. Alan Beban - wrote: =MAX(IF(B$1:B$100=2356,$A$1:$A$100)) Array Entered (Ctrl + Shift + Enter) "scidoc" wrote in message ... I have a array of numbers set up I need to find the "last" time a particular number shows up. i.e. the last time that part number sold. Column A contains the week number. The cells in columns B to G contain the part numbers that sold that week. What I need is if in week 32 was the last time part number 2356 sold. I need a function that will return the 32 with out looking through the list manually. |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Here is a formula you can use that can be entered normally...
=SUMPRODUCT(MAX((B1:B53=2356)*(B1:B53<"")*(A1:A53 ))) although I would put the 2356 in a cell, say C1, and then use this instead... =SUMPRODUCT(MAX((B1:B53=C1)*(B1:B53<"")*(A1:A53)) ) Put any part number in C1 and the above formula will tell you the week number is appears in (0 if it doesn't appear anywhere). Rick "scidoc" wrote in message ... I've tried both formulas, all they give me is 0. I've tried the IF function alone when there is only one occurence of 2356 in the array B1:G52 and all I get is a false unless the I put the formula in the same row as the occurence of 2356. Then it returns the vaule in the A1:A52 just like its susposed to. Could it be my version can't do ranges in the IF function??? I'm using excel 2000 9.0.8961 SP-3. "Alan Beban" wrote: Assuming you have only one years's data (i.e., 52 weeks), should be =MAX(IF(B$1:G$52=2356,$A$1:$A$52) Perhaps better still =MAX(IF(B$1:G$52=H1,$A$1:$A$52) with the part number in H1. Alan Beban - wrote: =MAX(IF(B$1:B$100=2356,$A$1:$A$100)) Array Entered (Ctrl + Shift + Enter) "scidoc" wrote in message ... I have a array of numbers set up I need to find the "last" time a particular number shows up. i.e. the last time that part number sold. Column A contains the week number. The cells in columns B to G contain the part numbers that sold that week. What I need is if in week 32 was the last time part number 2356 sold. I need a function that will return the 32 with out looking through the list manually. |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
That works great, it will take me a little time (and study) to understand the
logic of how it works though. "Rick Rothstein (MVP - VB)" wrote: Here is a formula you can use that can be entered normally... =SUMPRODUCT(MAX((B1:B53=2356)*(B1:B53<"")*(A1:A53 ))) although I would put the 2356 in a cell, say C1, and then use this instead... =SUMPRODUCT(MAX((B1:B53=C1)*(B1:B53<"")*(A1:A53)) ) Put any part number in C1 and the above formula will tell you the week number is appears in (0 if it doesn't appear anywhere). Rick "scidoc" wrote in message ... I've tried both formulas, all they give me is 0. I've tried the IF function alone when there is only one occurence of 2356 in the array B1:G52 and all I get is a false unless the I put the formula in the same row as the occurence of 2356. Then it returns the vaule in the A1:A52 just like its susposed to. Could it be my version can't do ranges in the IF function??? I'm using excel 2000 9.0.8961 SP-3. "Alan Beban" wrote: Assuming you have only one years's data (i.e., 52 weeks), should be =MAX(IF(B$1:G$52=2356,$A$1:$A$52) Perhaps better still =MAX(IF(B$1:G$52=H1,$A$1:$A$52) with the part number in H1. Alan Beban - wrote: =MAX(IF(B$1:B$100=2356,$A$1:$A$100)) Array Entered (Ctrl + Shift + Enter) "scidoc" wrote in message ... I have a array of numbers set up I need to find the "last" time a particular number shows up. i.e. the last time that part number sold. Column A contains the week number. The cells in columns B to G contain the part numbers that sold that week. What I need is if in week 32 was the last time part number 2356 sold. I need a function that will return the 32 with out looking through the list manually. |
#9
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Is there a reason you included the b1:b53<"" factor?
If the cell is equal to 2356, it won't be blank. "Rick Rothstein (MVP - VB)" wrote: Here is a formula you can use that can be entered normally... =SUMPRODUCT(MAX((B1:B53=2356)*(B1:B53<"")*(A1:A53 ))) although I would put the 2356 in a cell, say C1, and then use this instead... =SUMPRODUCT(MAX((B1:B53=C1)*(B1:B53<"")*(A1:A53)) ) Put any part number in C1 and the above formula will tell you the week number is appears in (0 if it doesn't appear anywhere). Rick "scidoc" wrote in message ... I've tried both formulas, all they give me is 0. I've tried the IF function alone when there is only one occurence of 2356 in the array B1:G52 and all I get is a false unless the I put the formula in the same row as the occurence of 2356. Then it returns the vaule in the A1:A52 just like its susposed to. Could it be my version can't do ranges in the IF function??? I'm using excel 2000 9.0.8961 SP-3. "Alan Beban" wrote: Assuming you have only one years's data (i.e., 52 weeks), should be =MAX(IF(B$1:G$52=2356,$A$1:$A$52) Perhaps better still =MAX(IF(B$1:G$52=H1,$A$1:$A$52) with the part number in H1. Alan Beban - wrote: =MAX(IF(B$1:B$100=2356,$A$1:$A$100)) Array Entered (Ctrl + Shift + Enter) "scidoc" wrote in message ... I have a array of numbers set up I need to find the "last" time a particular number shows up. i.e. the last time that part number sold. Column A contains the week number. The cells in columns B to G contain the part numbers that sold that week. What I need is if in week 32 was the last time part number 2356 sold. I need a function that will return the 32 with out looking through the list manually. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
occurance in each year | Excel Worksheet Functions | |||
Occurance Counting | Excel Worksheet Functions | |||
frequency of occurance of all words in 2-D array | Excel Discussion (Misc queries) | |||
Need Formula for Last Occurance | Excel Worksheet Functions | |||
frequency for each occurance | Excel Worksheet Functions |