Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Hi,
I have put together a spreadsheet to find codes, states, descriptions. It finds the data by dates. Columns a Dates, Codes, States, Descriptions If I put in a date it matches the code, state and description. My problem is that if I have 2 dates that are the same it will only match the first date it can find. What kind of formula do I need so that it will output the second or third date data. Thanks for your help. If you need a copy of the spreadsheet please let me know. |
#2
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
How many rows of data do you have?
-- Biff Microsoft Excel MVP "Melanie" wrote in message ... Hi, I have put together a spreadsheet to find codes, states, descriptions. It finds the data by dates. Columns a Dates, Codes, States, Descriptions If I put in a date it matches the code, state and description. My problem is that if I have 2 dates that are the same it will only match the first date it can find. What kind of formula do I need so that it will output the second or third date data. Thanks for your help. If you need a copy of the spreadsheet please let me know. |
#3
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Lots - over 300 at the moment and it gets added to all the time.
"T. Valko" wrote: How many rows of data do you have? -- Biff Microsoft Excel MVP "Melanie" wrote in message ... Hi, I have put together a spreadsheet to find codes, states, descriptions. It finds the data by dates. Columns a Dates, Codes, States, Descriptions If I put in a date it matches the code, state and description. My problem is that if I have 2 dates that are the same it will only match the first date it can find. What kind of formula do I need so that it will output the second or third date data. Thanks for your help. If you need a copy of the spreadsheet please let me know. |
#4
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
One way...
Assume your data is in the range A2:D500 F2:H2 = headers: Code, State, Description F1 = lookup date Enter this formula in G1. This will return the count of dates based on the date entered in cell F1: =COUNTIF(A:A,F1) Enter this array formula** in F3: =IF(ROWS(F$3:F3)<=$G$1,INDEX(B$2:B$500,SMALL(IF($A $2:$A$500=$F$1,ROW(B$2:B$500)),ROWS(F$3:F3))-ROW(B$2)+1),"") ** array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER. Copy across to H3 then down to a number of rows that ensures you get all the results. How many rows that is depends on the maximum count for any single date. For example, if 1/1/2009 appears the most times, let's say it appears 5 times, then you need to copy the formula to at least 5 rows. -- Biff Microsoft Excel MVP "Melanie" wrote in message ... Lots - over 300 at the moment and it gets added to all the time. "T. Valko" wrote: How many rows of data do you have? -- Biff Microsoft Excel MVP "Melanie" wrote in message ... Hi, I have put together a spreadsheet to find codes, states, descriptions. It finds the data by dates. Columns a Dates, Codes, States, Descriptions If I put in a date it matches the code, state and description. My problem is that if I have 2 dates that are the same it will only match the first date it can find. What kind of formula do I need so that it will output the second or third date data. Thanks for your help. If you need a copy of the spreadsheet please let me know. |
#5
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
I put the formulas in and the count works but the second formula gives me a
#Value Error. "T. Valko" wrote: One way... Assume your data is in the range A2:D500 F2:H2 = headers: Code, State, Description F1 = lookup date Enter this formula in G1. This will return the count of dates based on the date entered in cell F1: =COUNTIF(A:A,F1) Enter this array formula** in F3: =IF(ROWS(F$3:F3)<=$G$1,INDEX(B$2:B$500,SMALL(IF($A $2:$A$500=$F$1,ROW(B$2:B$500)),ROWS(F$3:F3))-ROW(B$2)+1),"") ** array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER. Copy across to H3 then down to a number of rows that ensures you get all the results. How many rows that is depends on the maximum count for any single date. For example, if 1/1/2009 appears the most times, let's say it appears 5 times, then you need to copy the formula to at least 5 rows. -- Biff Microsoft Excel MVP "Melanie" wrote in message ... Lots - over 300 at the moment and it gets added to all the time. "T. Valko" wrote: How many rows of data do you have? -- Biff Microsoft Excel MVP "Melanie" wrote in message ... Hi, I have put together a spreadsheet to find codes, states, descriptions. It finds the data by dates. Columns a Dates, Codes, States, Descriptions If I put in a date it matches the code, state and description. My problem is that if I have 2 dates that are the same it will only match the first date it can find. What kind of formula do I need so that it will output the second or third date data. Thanks for your help. If you need a copy of the spreadsheet please let me know. |
#6
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Did you array enter it as suggested?
-- __________________________________ HTH Bob "Melanie" wrote in message ... I put the formulas in and the count works but the second formula gives me a #Value Error. "T. Valko" wrote: One way... Assume your data is in the range A2:D500 F2:H2 = headers: Code, State, Description F1 = lookup date Enter this formula in G1. This will return the count of dates based on the date entered in cell F1: =COUNTIF(A:A,F1) Enter this array formula** in F3: =IF(ROWS(F$3:F3)<=$G$1,INDEX(B$2:B$500,SMALL(IF($A $2:$A$500=$F$1,ROW(B$2:B$500)),ROWS(F$3:F3))-ROW(B$2)+1),"") ** array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER. Copy across to H3 then down to a number of rows that ensures you get all the results. How many rows that is depends on the maximum count for any single date. For example, if 1/1/2009 appears the most times, let's say it appears 5 times, then you need to copy the formula to at least 5 rows. -- Biff Microsoft Excel MVP "Melanie" wrote in message ... Lots - over 300 at the moment and it gets added to all the time. "T. Valko" wrote: How many rows of data do you have? -- Biff Microsoft Excel MVP "Melanie" wrote in message ... Hi, I have put together a spreadsheet to find codes, states, descriptions. It finds the data by dates. Columns a Dates, Codes, States, Descriptions If I put in a date it matches the code, state and description. My problem is that if I have 2 dates that are the same it will only match the first date it can find. What kind of formula do I need so that it will output the second or third date data. Thanks for your help. If you need a copy of the spreadsheet please let me know. |
#7
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
I have now. And it is now working.
Thank you so much for all your help. "Bob Phillips" wrote: Did you array enter it as suggested? -- __________________________________ HTH Bob "Melanie" wrote in message ... I put the formulas in and the count works but the second formula gives me a #Value Error. "T. Valko" wrote: One way... Assume your data is in the range A2:D500 F2:H2 = headers: Code, State, Description F1 = lookup date Enter this formula in G1. This will return the count of dates based on the date entered in cell F1: =COUNTIF(A:A,F1) Enter this array formula** in F3: =IF(ROWS(F$3:F3)<=$G$1,INDEX(B$2:B$500,SMALL(IF($A $2:$A$500=$F$1,ROW(B$2:B$500)),ROWS(F$3:F3))-ROW(B$2)+1),"") ** array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER. Copy across to H3 then down to a number of rows that ensures you get all the results. How many rows that is depends on the maximum count for any single date. For example, if 1/1/2009 appears the most times, let's say it appears 5 times, then you need to copy the formula to at least 5 rows. -- Biff Microsoft Excel MVP "Melanie" wrote in message ... Lots - over 300 at the moment and it gets added to all the time. "T. Valko" wrote: How many rows of data do you have? -- Biff Microsoft Excel MVP "Melanie" wrote in message ... Hi, I have put together a spreadsheet to find codes, states, descriptions. It finds the data by dates. Columns a Dates, Codes, States, Descriptions If I put in a date it matches the code, state and description. My problem is that if I have 2 dates that are the same it will only match the first date it can find. What kind of formula do I need so that it will output the second or third date data. Thanks for your help. If you need a copy of the spreadsheet please let me know. |
#8
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Glad you got it straightened out! Thanks for the feedback!
-- Biff Microsoft Excel MVP "Melanie" wrote in message ... I have now. And it is now working. Thank you so much for all your help. "Bob Phillips" wrote: Did you array enter it as suggested? -- __________________________________ HTH Bob "Melanie" wrote in message ... I put the formulas in and the count works but the second formula gives me a #Value Error. "T. Valko" wrote: One way... Assume your data is in the range A2:D500 F2:H2 = headers: Code, State, Description F1 = lookup date Enter this formula in G1. This will return the count of dates based on the date entered in cell F1: =COUNTIF(A:A,F1) Enter this array formula** in F3: =IF(ROWS(F$3:F3)<=$G$1,INDEX(B$2:B$500,SMALL(IF($A $2:$A$500=$F$1,ROW(B$2:B$500)),ROWS(F$3:F3))-ROW(B$2)+1),"") ** array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER. Copy across to H3 then down to a number of rows that ensures you get all the results. How many rows that is depends on the maximum count for any single date. For example, if 1/1/2009 appears the most times, let's say it appears 5 times, then you need to copy the formula to at least 5 rows. -- Biff Microsoft Excel MVP "Melanie" wrote in message ... Lots - over 300 at the moment and it gets added to all the time. "T. Valko" wrote: How many rows of data do you have? -- Biff Microsoft Excel MVP "Melanie" wrote in message ... Hi, I have put together a spreadsheet to find codes, states, descriptions. It finds the data by dates. Columns a Dates, Codes, States, Descriptions If I put in a date it matches the code, state and description. My problem is that if I have 2 dates that are the same it will only match the first date it can find. What kind of formula do I need so that it will output the second or third date data. Thanks for your help. If you need a copy of the spreadsheet please let me know. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
find the second match using the match function | Excel Worksheet Functions | |||
how can we get unique values in match function for same match key. | Excel Worksheet Functions | |||
index match array function-returning only first match, need last. | Excel Worksheet Functions | |||
Match as well as does not match array function | Excel Discussion (Misc queries) | |||
Offset function with nested match function not finding host ss. | Excel Worksheet Functions |