Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Dear All,
Here is the sample database. Date Salesman Region 16-Aug-08 A N 16-Aug-09 B E 16-June-07 C S 15-Aug-07 A S 15-Apr-07 B E 4-Sep-07 D N 4-May-07 E N 6-Sep-07 A N 3-Oct-07 B W 24-Sep-07 E E i would like to concatenate for Salesman B and Region E(east) in A1, so the result will be "15-Apr-07,16-Aug-09"... which formula can solve it? tried SMALL + sumproduct(but...this sum all the date in that arrays). thank you for your kind attention and help. respectfully, andri |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Andri,
As long as those are properly formatted dates try this ARRAY formula. the lookup values are in D2 (B) and E2 (E) =TEXT(MIN(IF(B2:B11=D2,IF(C2:C11=E2,A2:A11))),"dd-mmm-yy")&" , "&TEXT(MAX(IF(B2:B11=D2,IF(C2:C11=E2,A2:A11))) ,"dd-mmm-yy") This is an array formula which must be entered by pressing CTRL+Shift+Enter and not just Enter. If you do it correctly then Excel will put curly brackets around the formula {}. You can't type these yourself. If you edit the formula you must enter it again with CTRL+Shift+Enter. -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "Andri" wrote: Dear All, Here is the sample database. Date Salesman Region 16-Aug-08 A N 16-Aug-09 B E 16-June-07 C S 15-Aug-07 A S 15-Apr-07 B E 4-Sep-07 D N 4-May-07 E N 6-Sep-07 A N 3-Oct-07 B W 24-Sep-07 E E i would like to concatenate for Salesman B and Region E(east) in A1, so the result will be "15-Apr-07,16-Aug-09"... which formula can solve it? tried SMALL + sumproduct(but...this sum all the date in that arrays). thank you for your kind attention and help. respectfully, andri |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Dear Mike,
thank you for your kind and response. the formula is workable. but it only show for two dates only MIN and MAX. the required solution, to list down all the date, from the smallest, increasing date and ended with the Largest date. so some records might contain several dates (3, 4, 5 or even 6dates). how to adjust it? TIA "Mike H" wrote: Andri, As long as those are properly formatted dates try this ARRAY formula. the lookup values are in D2 (B) and E2 (E) =TEXT(MIN(IF(B2:B11=D2,IF(C2:C11=E2,A2:A11))),"dd-mmm-yy")&" , "&TEXT(MAX(IF(B2:B11=D2,IF(C2:C11=E2,A2:A11))) ,"dd-mmm-yy") This is an array formula which must be entered by pressing CTRL+Shift+Enter and not just Enter. If you do it correctly then Excel will put curly brackets around the formula {}. You can't type these yourself. If you edit the formula you must enter it again with CTRL+Shift+Enter. -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "Andri" wrote: Dear All, Here is the sample database. Date Salesman Region 16-Aug-08 A N 16-Aug-09 B E 16-June-07 C S 15-Aug-07 A S 15-Apr-07 B E 4-Sep-07 D N 4-May-07 E N 6-Sep-07 A N 3-Oct-07 B W 24-Sep-07 E E i would like to concatenate for Salesman B and Region E(east) in A1, so the result will be "15-Apr-07,16-Aug-09"... which formula can solve it? tried SMALL + sumproduct(but...this sum all the date in that arrays). thank you for your kind attention and help. respectfully, andri |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
I don't know how to do that with a formula but here's a UDF that does it. Alt +F11 to open VB editor. Right click "ThisWorkbook' and insert module and paste the code in call with =ConCat(A2:A11,D2,E2) Where A2:A11 are the dates and D2 & E2 are the 2 lookup values Function ConCat(rng As Range, rep As String, area As String) As String Dim R As Long, R1 As Long, x As Long Application.Volatile rep = UCase(rep) area = UCase(area) For Each c In rng If UCase(c.Offset(, 1)) = rep And UCase(c.Offset(, 2)) = area Then MyString = MyString & c.Value & "," End If Next v = Split(MyString, ",") For R = 0 To UBound(v) For R1 = R To UBound(v) If v(R1) < v(R) Then str1 = v(R) str2 = v(R1) v(R) = str2 v(R1) = str1 End If Next R1 Next R For x = 1 To UBound(v) ConCat = ConCat & v(x) & " , " Next ConCat = Left(ConCat, (Len(ConCat) - 2)) End Function -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "Andri" wrote: Dear Mike, thank you for your kind and response. the formula is workable. but it only show for two dates only MIN and MAX. the required solution, to list down all the date, from the smallest, increasing date and ended with the Largest date. so some records might contain several dates (3, 4, 5 or even 6dates). how to adjust it? TIA "Mike H" wrote: Andri, As long as those are properly formatted dates try this ARRAY formula. the lookup values are in D2 (B) and E2 (E) =TEXT(MIN(IF(B2:B11=D2,IF(C2:C11=E2,A2:A11))),"dd-mmm-yy")&" , "&TEXT(MAX(IF(B2:B11=D2,IF(C2:C11=E2,A2:A11))) ,"dd-mmm-yy") This is an array formula which must be entered by pressing CTRL+Shift+Enter and not just Enter. If you do it correctly then Excel will put curly brackets around the formula {}. You can't type these yourself. If you edit the formula you must enter it again with CTRL+Shift+Enter. -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "Andri" wrote: Dear All, Here is the sample database. Date Salesman Region 16-Aug-08 A N 16-Aug-09 B E 16-June-07 C S 15-Aug-07 A S 15-Apr-07 B E 4-Sep-07 D N 4-May-07 E N 6-Sep-07 A N 3-Oct-07 B W 24-Sep-07 E E i would like to concatenate for Salesman B and Region E(east) in A1, so the result will be "15-Apr-07,16-Aug-09"... which formula can solve it? tried SMALL + sumproduct(but...this sum all the date in that arrays). thank you for your kind attention and help. respectfully, andri |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
That doesn't work
-- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "Mike H" wrote: Hi, I don't know how to do that with a formula but here's a UDF that does it. Alt +F11 to open VB editor. Right click "ThisWorkbook' and insert module and paste the code in call with =ConCat(A2:A11,D2,E2) Where A2:A11 are the dates and D2 & E2 are the 2 lookup values Function ConCat(rng As Range, rep As String, area As String) As String Dim R As Long, R1 As Long, x As Long Application.Volatile rep = UCase(rep) area = UCase(area) For Each c In rng If UCase(c.Offset(, 1)) = rep And UCase(c.Offset(, 2)) = area Then MyString = MyString & c.Value & "," End If Next v = Split(MyString, ",") For R = 0 To UBound(v) For R1 = R To UBound(v) If v(R1) < v(R) Then str1 = v(R) str2 = v(R1) v(R) = str2 v(R1) = str1 End If Next R1 Next R For x = 1 To UBound(v) ConCat = ConCat & v(x) & " , " Next ConCat = Left(ConCat, (Len(ConCat) - 2)) End Function -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "Andri" wrote: Dear Mike, thank you for your kind and response. the formula is workable. but it only show for two dates only MIN and MAX. the required solution, to list down all the date, from the smallest, increasing date and ended with the Largest date. so some records might contain several dates (3, 4, 5 or even 6dates). how to adjust it? TIA "Mike H" wrote: Andri, As long as those are properly formatted dates try this ARRAY formula. the lookup values are in D2 (B) and E2 (E) =TEXT(MIN(IF(B2:B11=D2,IF(C2:C11=E2,A2:A11))),"dd-mmm-yy")&" , "&TEXT(MAX(IF(B2:B11=D2,IF(C2:C11=E2,A2:A11))) ,"dd-mmm-yy") This is an array formula which must be entered by pressing CTRL+Shift+Enter and not just Enter. If you do it correctly then Excel will put curly brackets around the formula {}. You can't type these yourself. If you edit the formula you must enter it again with CTRL+Shift+Enter. -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "Andri" wrote: Dear All, Here is the sample database. Date Salesman Region 16-Aug-08 A N 16-Aug-09 B E 16-June-07 C S 15-Aug-07 A S 15-Apr-07 B E 4-Sep-07 D N 4-May-07 E N 6-Sep-07 A N 3-Oct-07 B W 24-Sep-07 E E i would like to concatenate for Salesman B and Region E(east) in A1, so the result will be "15-Apr-07,16-Aug-09"... which formula can solve it? tried SMALL + sumproduct(but...this sum all the date in that arrays). thank you for your kind attention and help. respectfully, andri |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try this UDF (User Defined function) . From workbook launch VBE using
Alt+F11. From menu Insert a Module and paste the below function.Close and get back to workbook and try the below formula. Syntax: =CONCAT(rngRange,intLookupColumn1, strLookupValue1, intLookupColumn2, strLookupValue2, intReturnColumn, strFormat As String, strDelimiter) rngRange is the data range intLookupColumn1 is the First lookup column strLookupValue1 is the value to be looked up in the first lookup column intLookupColumn2 is the second lookup column strLookupValue2 is the value to be looked up in the second lookup column intReturnColumn is the column to be returned strFormat is optional if to be formatted strDelimiter is optional delimiter. Default is space Examples: '1. With data in A1:C11; to vlookup 'B' and "E" from 2 and 3rd columns and sort and concatenate each entry with " ," (space followed by a comma) the formula would be =concat(A1:C11,2,"B",3,"E",1,"dd-mmm-yy"," ,") Function CONCAT(rngRange As Range, _ intLookupColumn1 As Integer, strLookupValue1 As String, _ intLookupColumn2 As Integer, strLookupValue2 As String, _ intReturnColumn As Integer, Optional strFormat As String, _ Optional strDelimiter As String = " ") Dim lngRow As Long, arrDate() As Variant, varDate As Variant Dim lngTemp1 As Long, lngTemp2 As Long ReDim arrDate(0) For lngRow = 1 To rngRange.Rows.Count If StrComp(CStr(rngRange(lngRow, intLookupColumn1)), _ strLookupValue1, vbTextCompare) = 0 And _ StrComp(CStr(rngRange(lngRow, intLookupColumn2)), _ strLookupValue2, vbTextCompare) = 0 Then ReDim Preserve arrDate(UBound(arrDate) + 1) arrDate(UBound(arrDate)) = rngRange(lngRow, intReturnColumn) End If Next If UBound(arrDate) 1 Then For lngTemp1 = 1 To UBound(arrDate) For lngTemp2 = lngTemp1 To UBound(arrDate) If arrDate(lngTemp1) arrDate(lngTemp2) Then varDate = arrDate(lngTemp1) arrDate(lngTemp1) = arrDate(lngTemp2) arrDate(lngTemp2) = varDate End If Next Next End If For lngTemp1 = 1 To UBound(arrDate) CONCAT = CONCAT & strDelimiter & Format(arrDate(lngTemp1), strFormat) Next CONCAT = Mid(CONCAT, Len(strDelimiter) + 1) End Function PS: You can modify this UDF to have the second lookup optional and to have the sort optional...Thus this could be re-used for all type of LOOKUP() CONCATENATE() requirements -- Jacob (MVP - Excel) "Andri" wrote: Dear All, Here is the sample database. Date Salesman Region 16-Aug-08 A N 16-Aug-09 B E 16-June-07 C S 15-Aug-07 A S 15-Apr-07 B E 4-Sep-07 D N 4-May-07 E N 6-Sep-07 A N 3-Oct-07 B W 24-Sep-07 E E i would like to concatenate for Salesman B and Region E(east) in A1, so the result will be "15-Apr-07,16-Aug-09"... which formula can solve it? tried SMALL + sumproduct(but...this sum all the date in that arrays). thank you for your kind attention and help. respectfully, andri |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try this:
=IF(ISERR(MATCH(SMALL(IF((Salesman="B")*(Region="E "),COUNTIF(Date,"<"&Date)),ROWS($1:1)),COUNTIF(Dat e,"<"&Date),0)),"",INDEX(Date,MATCH(SMALL(IF((Sale sman="B")*(Region="E"),COUNTIF(Date,"<"&Date)),ROW S($1:1)),COUNTIF(Date,"<"&Date),0))) ctrl+shift+enter, not just enter copy down as far as needed "Andri" wrote: Dear All, Here is the sample database. Date Salesman Region 16-Aug-08 A N 16-Aug-09 B E 16-June-07 C S 15-Aug-07 A S 15-Apr-07 B E 4-Sep-07 D N 4-May-07 E N 6-Sep-07 A N 3-Oct-07 B W 24-Sep-07 E E i would like to concatenate for Salesman B and Region E(east) in A1, so the result will be "15-Apr-07,16-Aug-09"... which formula can solve it? tried SMALL + sumproduct(but...this sum all the date in that arrays). thank you for your kind attention and help. respectfully, andri |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
This one slightly shorter:
=IF(SUMPRODUCT((Salesman="B")*(Region="E"))=ROWS( $1:1),INDEX(Date,MATCH(SMALL(IF((Salesman="B")*(Re gion="E"),COUNTIF(Date,"<"&Date)),ROWS($1:1)),COUN TIF(Date,"<"&Date),0)),"") ctrl+shift+enter, not just enter copy down as far as needed "Teethless mama" wrote: Try this: =IF(ISERR(MATCH(SMALL(IF((Salesman="B")*(Region="E "),COUNTIF(Date,"<"&Date)),ROWS($1:1)),COUNTIF(Dat e,"<"&Date),0)),"",INDEX(Date,MATCH(SMALL(IF((Sale sman="B")*(Region="E"),COUNTIF(Date,"<"&Date)),ROW S($1:1)),COUNTIF(Date,"<"&Date),0))) ctrl+shift+enter, not just enter copy down as far as needed "Andri" wrote: Dear All, Here is the sample database. Date Salesman Region 16-Aug-08 A N 16-Aug-09 B E 16-June-07 C S 15-Aug-07 A S 15-Apr-07 B E 4-Sep-07 D N 4-May-07 E N 6-Sep-07 A N 3-Oct-07 B W 24-Sep-07 E E i would like to concatenate for Salesman B and Region E(east) in A1, so the result will be "15-Apr-07,16-Aug-09"... which formula can solve it? tried SMALL + sumproduct(but...this sum all the date in that arrays). thank you for your kind attention and help. respectfully, andri |
#9
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Dear TM,
the formula is working well, but only the result the FIRST match, due ROWS($1:1). but intentionally, we would like to concatenate ALL date available in one cells. if we copy the formula to other column, it workable. here is the tested formula: TGL Man Region 16-Aug-08 A N B E 17-Aug-11 B E 7-Sep-09 C S 1-Feb-10 B E 15-Apr-07 B E 4-Sep-07 D N 4-May-07 E N 6-Sep-07 A N 3-Oct-10 B E 24-Sep-08 E E 15-Apr-07 1-Feb-10 3-Oct-10 17-Aug-11 =IF(ISERR(MATCH(SMALL(IF((MAN=$T21)*(Region=$U21), COUNTIF(TGL,"<"&TGL)),COLUMN(Q34)-16),COUNTIF(TGL,"<"&TGL),0)),"",INDEX(TGL,MATCH(SM ALL(IF((MAN=$T21)*(Region=$U21),COUNTIF(TGL,"<"&TG L)),COLUMN(Q34)-16),COUNTIF(TGL,"<"&TGL),0))) "Teethless mama" wrote: Try this: =IF(ISERR(MATCH(SMALL(IF((Salesman="B")*(Region="E "),COUNTIF(Date,"<"&Date)),ROWS($1:1)),COUNTIF(Dat e,"<"&Date),0)),"",INDEX(Date,MATCH(SMALL(IF((Sale sman="B")*(Region="E"),COUNTIF(Date,"<"&Date)),ROW S($1:1)),COUNTIF(Date,"<"&Date),0))) ctrl+shift+enter, not just enter copy down as far as needed "Andri" wrote: Dear All, Here is the sample database. Date Salesman Region 16-Aug-08 A N 16-Aug-09 B E 16-June-07 C S 15-Aug-07 A S 15-Apr-07 B E 4-Sep-07 D N 4-May-07 E N 6-Sep-07 A N 3-Oct-07 B W 24-Sep-07 E E i would like to concatenate for Salesman B and Region E(east) in A1, so the result will be "15-Apr-07,16-Aug-09"... which formula can solve it? tried SMALL + sumproduct(but...this sum all the date in that arrays). thank you for your kind attention and help. respectfully, andri |
#10
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try PIVOT table
"Andri" wrote: Dear All, Here is the sample database. Date Salesman Region 16-Aug-08 A N 16-Aug-09 B E 16-June-07 C S 15-Aug-07 A S 15-Apr-07 B E 4-Sep-07 D N 4-May-07 E N 6-Sep-07 A N 3-Oct-07 B W 24-Sep-07 E E i would like to concatenate for Salesman B and Region E(east) in A1, so the result will be "15-Apr-07,16-Aug-09"... which formula can solve it? tried SMALL + sumproduct(but...this sum all the date in that arrays). thank you for your kind attention and help. respectfully, andri |
#11
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Dear TM,
still figuring out your formula and Mike's formula. related your suggestion to use pivot table, i prefer to use formula instead of PT. thank you and respectfully, andri "Teethless mama" wrote: Try PIVOT table "Andri" wrote: Dear All, Here is the sample database. Date Salesman Region 16-Aug-08 A N 16-Aug-09 B E 16-June-07 C S 15-Aug-07 A S 15-Apr-07 B E 4-Sep-07 D N 4-May-07 E N 6-Sep-07 A N 3-Oct-07 B W 24-Sep-07 E E i would like to concatenate for Salesman B and Region E(east) in A1, so the result will be "15-Apr-07,16-Aug-09"... which formula can solve it? tried SMALL + sumproduct(but...this sum all the date in that arrays). thank you for your kind attention and help. respectfully, andri |
#12
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You can not do this (for all practical purposes) if you want all the results
to be concatenated into a single cell using built-in functions. You need to use a VBA procedure. -- Biff Microsoft Excel MVP "Andri" wrote in message ... Dear TM, still figuring out your formula and Mike's formula. related your suggestion to use pivot table, i prefer to use formula instead of PT. thank you and respectfully, andri "Teethless mama" wrote: Try PIVOT table "Andri" wrote: Dear All, Here is the sample database. Date Salesman Region 16-Aug-08 A N 16-Aug-09 B E 16-June-07 C S 15-Aug-07 A S 15-Apr-07 B E 4-Sep-07 D N 4-May-07 E N 6-Sep-07 A N 3-Oct-07 B W 24-Sep-07 E E i would like to concatenate for Salesman B and Region E(east) in A1, so the result will be "15-Apr-07,16-Aug-09"... which formula can solve it? tried SMALL + sumproduct(but...this sum all the date in that arrays). thank you for your kind attention and help. respectfully, andri |
#13
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Dear Biff,
thank you for your kind excellent advice for the practical purposes. Message noted, we will copy the each result into the each cells. Now focusing on the UDF module. thank you for your kind help to all of you. have a nice weekend respectfully, andri "T. Valko" wrote: You can not do this (for all practical purposes) if you want all the results to be concatenated into a single cell using built-in functions. You need to use a VBA procedure. -- Biff Microsoft Excel MVP "Andri" wrote in message ... Dear TM, still figuring out your formula and Mike's formula. related your suggestion to use pivot table, i prefer to use formula instead of PT. thank you and respectfully, andri "Teethless mama" wrote: Try PIVOT table "Andri" wrote: Dear All, Here is the sample database. Date Salesman Region 16-Aug-08 A N 16-Aug-09 B E 16-June-07 C S 15-Aug-07 A S 15-Apr-07 B E 4-Sep-07 D N 4-May-07 E N 6-Sep-07 A N 3-Oct-07 B W 24-Sep-07 E E i would like to concatenate for Salesman B and Region E(east) in A1, so the result will be "15-Apr-07,16-Aug-09"... which formula can solve it? tried SMALL + sumproduct(but...this sum all the date in that arrays). thank you for your kind attention and help. respectfully, andri . |
#14
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi Andri
Did you try the UDF i posted? -- Jacob (MVP - Excel) "Andri" wrote: Dear Biff, thank you for your kind excellent advice for the practical purposes. Message noted, we will copy the each result into the each cells. Now focusing on the UDF module. thank you for your kind help to all of you. have a nice weekend respectfully, andri "T. Valko" wrote: You can not do this (for all practical purposes) if you want all the results to be concatenated into a single cell using built-in functions. You need to use a VBA procedure. -- Biff Microsoft Excel MVP "Andri" wrote in message ... Dear TM, still figuring out your formula and Mike's formula. related your suggestion to use pivot table, i prefer to use formula instead of PT. thank you and respectfully, andri "Teethless mama" wrote: Try PIVOT table "Andri" wrote: Dear All, Here is the sample database. Date Salesman Region 16-Aug-08 A N 16-Aug-09 B E 16-June-07 C S 15-Aug-07 A S 15-Apr-07 B E 4-Sep-07 D N 4-May-07 E N 6-Sep-07 A N 3-Oct-07 B W 24-Sep-07 E E i would like to concatenate for Salesman B and Region E(east) in A1, so the result will be "15-Apr-07,16-Aug-09"... which formula can solve it? tried SMALL + sumproduct(but...this sum all the date in that arrays). thank you for your kind attention and help. respectfully, andri . |
#15
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
Download and install the following addin - http://www.download.com/Morefunc/300...-10423159.html and then use the following array formula =SUBSTITUTE(TRIM(MCONCAT(IF((($B$2:$B$11=B15)*($C$ 2:$C$11=C15)),TEXT(A2:A11,"dd/mm/yyyy")," ")))," ",", ") B15 has A and C15 has N -- Regards, Ashish Mathur Microsoft Excel MVP www.ashishmathur.com "Andri" wrote in message ... Dear All, Here is the sample database. Date Salesman Region 16-Aug-08 A N 16-Aug-09 B E 16-June-07 C S 15-Aug-07 A S 15-Apr-07 B E 4-Sep-07 D N 4-May-07 E N 6-Sep-07 A N 3-Oct-07 B W 24-Sep-07 E E i would like to concatenate for Salesman B and Region E(east) in A1, so the result will be "15-Apr-07,16-Aug-09"... which formula can solve it? tried SMALL + sumproduct(but...this sum all the date in that arrays). thank you for your kind attention and help. respectfully, andri |
#16
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Dear Ashish,
thank you ... it solved the problem. Respectfully, andri "Ashish Mathur" wrote: Hi, Download and install the following addin - http://www.download.com/Morefunc/300...-10423159.html and then use the following array formula =SUBSTITUTE(TRIM(MCONCAT(IF((($B$2:$B$11=B15)*($C$ 2:$C$11=C15)),TEXT(A2:A11,"dd/mm/yyyy")," ")))," ",", ") B15 has A and C15 has N -- Regards, Ashish Mathur Microsoft Excel MVP www.ashishmathur.com "Andri" wrote in message ... Dear All, Here is the sample database. Date Salesman Region 16-Aug-08 A N 16-Aug-09 B E 16-June-07 C S 15-Aug-07 A S 15-Apr-07 B E 4-Sep-07 D N 4-May-07 E N 6-Sep-07 A N 3-Oct-07 B W 24-Sep-07 E E i would like to concatenate for Salesman B and Region E(east) in A1, so the result will be "15-Apr-07,16-Aug-09"... which formula can solve it? tried SMALL + sumproduct(but...this sum all the date in that arrays). thank you for your kind attention and help. respectfully, andri |
#17
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Dear Ashish,
thank you for your excellent External Excel Function, which is workable 100%. but i have another issued, when the cells contains TEXT cells, the result is little bit strange (without a comma). here is the result: CLOSEDCLOSED, it should be CLOSED, CLOSED CLOSEDCANCEL, it should be CLOSED, CANCEL please help and TIA. respectfully, andri "Ashish Mathur" wrote: Hi, Download and install the following addin - http://www.download.com/Morefunc/300...-10423159.html and then use the following array formula =SUBSTITUTE(TRIM(MCONCAT(IF((($B$2:$B$11=B15)*($C$ 2:$C$11=C15)),TEXT(A2:A11,"dd/mm/yyyy")," ")))," ",", ") B15 has A and C15 has N -- Regards, Ashish Mathur Microsoft Excel MVP www.ashishmathur.com "Andri" wrote in message ... Dear All, Here is the sample database. Date Salesman Region 16-Aug-08 A N 16-Aug-09 B E 16-June-07 C S 15-Aug-07 A S 15-Apr-07 B E 4-Sep-07 D N 4-May-07 E N 6-Sep-07 A N 3-Oct-07 B W 24-Sep-07 E E i would like to concatenate for Salesman B and Region E(east) in A1, so the result will be "15-Apr-07,16-Aug-09"... which formula can solve it? tried SMALL + sumproduct(but...this sum all the date in that arrays). thank you for your kind attention and help. respectfully, andri |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Concatenate With Criteria | Excel Worksheet Functions | |||
Returning the smallest value above a certain criteria | Excel Worksheet Functions | |||
Return a smallest date | Excel Worksheet Functions | |||
formula to look up and return smallest date from a range of dates | Excel Worksheet Functions | |||
I know how to concatenate ,can one de-concatenate to split date? | New Users to Excel |