So I have a list of URLS and I need to return all the related ones into one string. The urls are laid out in a logical manner Domain / directory / sub-directory /
In theory this should work, but I'm getting some random urls in there. I just want any url that contains the group slug none others.
[TABLE="width: 1256"]
<colgroup><col style="mso-width-source:userset;mso-width-alt:20821;width:488pt" width="651"> <col style="mso-width-source:userset;mso-width-alt:8490;width:199pt" width="265"> <col style="width:65pt" width="87"> <col style="mso-width-source:userset;mso-width-alt:21504;width:504pt" width="672"> </colgroup><tbody>[TR]
[TD="class: xl68, width: 651"]URL
[/TD]
[TD="class: xl68, width: 265"]Group[/TD]
[TD="class: xl69, width: 87"][/TD]
[TD="class: xl68, width: 672"]URL[/TD]
[/TR]
[TR]
[TD="class: xl66"]https://deserthopetreatment.com/[/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl66"]https://deserthopetreatment.com/[/TD]
[/TR]
[TR]
[TD="class: xl67"]https://deserthopetreatment.com/addiction-recovery-program-overview/specialized-treatment/[/TD]
[TD]addiction-recovery-program-overview[/TD]
[TD][/TD]
[TD="class: xl67"]https://deserthopetreatment.com/addiction-recovery-program-overview/specialized-treatment/[/TD]
[/TR]
[TR]
[TD="class: xl66"]https://deserthopetreatment.com/lsd/[/TD]
[TD]lsd[/TD]
[TD][/TD]
[TD="class: xl66"]https://deserthopetreatment.com/lsd/[/TD]
[/TR]
[TR]
[TD="class: xl67"]https://deserthopetreatment.com/drug-abuse/pregnancy/[/TD]
[TD]drug-abuse[/TD]
[TD][/TD]
[TD="class: xl67"]https://deserthopetreatment.com/drug-abuse/pregnancy/[/TD]
[/TR]
[TR]
[TD="class: xl66"]https://deserthopetreatment.com/marijuana/[/TD]
[TD]marijuana[/TD]
[TD][/TD]
[TD="class: xl66"]https://deserthopetreatment.com/marijuana/[/TD]
[/TR]
[TR]
[TD="class: xl67"]https://deserthopetreatment.com/drug-abuse/[/TD]
[TD]drug-abuse[/TD]
[TD][/TD]
[TD="class: xl67"]https://deserthopetreatment.com/drug-abuse/[/TD]
[/TR]
[TR]
[TD="class: xl65"]https://deserthopetreatment.com/drug-recovery/inpatient/[/TD]
[TD]drug-recovery[/TD]
[TD][/TD]
[TD="class: xl65"]https://deserthopetreatment.com/drug-recovery/inpatient/[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 1256"]
<colgroup><col style="mso-width-source:userset;mso-width-alt:20821;width:488pt" width="651"> <col style="mso-width-source:userset;mso-width-alt:8490;width:199pt" width="265"> <col style="width:65pt" width="87"> <col style="mso-width-source:userset;mso-width-alt:21504;width:504pt" width="672"> </colgroup><tbody>[TR]
[TD="class: xl66, width: 651"]https://deserthopetreatment.com/admissions/what-to-expect/[/TD]
[TD="width: 265"]admissions[/TD]
[TD="width: 87"][/TD]
[TD="class: xl66, width: 672"]https://deserthopetreatment.com/admissions/what-to-expect/[/TD]
[/TR]
[TR]
[TD="class: xl65"]https://deserthopetreatment.com/ptsd-substance-abuse/[/TD]
[TD]ptsd-substance-abuse[/TD]
[TD][/TD]
[TD="class: xl65"]https://deserthopetreatment.com/ptsd-substance-abuse/[/TD]
[/TR]
[TR]
[TD="class: xl66"]https://deserthopetreatment.com/guides/[/TD]
[TD]guides[/TD]
[TD][/TD]
[TD="class: xl66"]https://deserthopetreatment.com/guides/[/TD]
[/TR]
[TR]
[TD="class: xl65"]https://deserthopetreatment.com/addiction-recovery-program-overview/aftercare/[/TD]
[TD]addiction-recovery-program-overview[/TD]
[TD][/TD]
[TD="class: xl65"]https://deserthopetreatment.com/addiction-recovery-program-overview/aftercare/[/TD]
[/TR]
[TR]
[TD="class: xl66"]https://deserthopetreatment.com/bpd-substance-abuse/[/TD]
[TD]bpd-substance-abuse[/TD]
[TD][/TD]
[TD="class: xl66"]https://deserthopetreatment.com/bpd-substance-abuse/[/TD]
[/TR]
[TR]
[TD="class: xl65"]https://deserthopetreatment.com/ocd-substance-abuse/[/TD]
[TD]ocd-substance-abuse[/TD]
[TD][/TD]
[TD="class: xl65"]https://deserthopetreatment.com/ocd-substance-abuse/[/TD]
[/TR]
[TR]
[TD="class: xl66"]https://deserthopetreatment.com/addiction-recovery-program-overview/therapy-types/[/TD]
[TD]addiction-recovery-program-overview[/TD]
[TD][/TD]
[TD="class: xl66"]https://deserthopetreatment.com/addiction-recovery-program-overview/therapy-types/[/TD]
[/TR]
[TR]
[TD="class: xl65"]https://deserthopetreatment.com/addiction-recovery-program-overview/[/TD]
[TD]addiction-recovery-program-overview[/TD]
[TD][/TD]
[TD="class: xl65"]https://deserthopetreatment.com/addiction-recovery-program-overview/[/TD]
[/TR]
</tbody>[/TABLE]
<style>table { }tr { }col { }br { }td { padding-top: 1px; padding-right: 1px; padding-left: 1px; color: black; font-size: 12pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; vertical-align: bottom; border: medium none; white-space: nowrap; }.xl65 { border-color: rgb(142, 169, 219) currentcolor rgb(142, 169, 219) rgb(142, 169, 219); border-style: solid none solid solid; border-width: 0.5pt medium 0.5pt 0.5pt; background: rgb(217, 225, 242) none repeat scroll 0% 0%; }.xl66 { border-color: rgb(142, 169, 219) currentcolor rgb(142, 169, 219) rgb(142, 169, 219); border-style: solid none solid solid; border-width: 0.5pt medium 0.5pt 0.5pt; }</style><style>table { }tr { }col { }br { }td { padding-top: 1px; padding-right: 1px; padding-left: 1px; color: black; font-size: 12pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; vertical-align: bottom; border: medium none; white-space: nowrap; }.xl65 { border-color: rgb(142, 169, 219) currentcolor rgb(142, 169, 219) rgb(142, 169, 219); border-style: solid none solid solid; border-width: 0.5pt medium 0.5pt 0.5pt; background: rgb(226, 239, 218) none repeat scroll 0% 0%; }.xl66 { border-color: rgb(142, 169, 219) currentcolor rgb(142, 169, 219) rgb(142, 169, 219); border-style: solid none solid solid; border-width: 0.5pt medium 0.5pt 0.5pt; background: rgb(217, 225, 242) none repeat scroll 0% 0%; }.xl67 { border-color: rgb(142, 169, 219) currentcolor rgb(142, 169, 219) rgb(142, 169, 219); border-style: solid none solid solid; border-width: 0.5pt medium 0.5pt 0.5pt; }.xl68 { font-weight: 700; text-align: center; }.xl69 { font-weight: 700; }</style>
In theory this should work, but I'm getting some random urls in there. I just want any url that contains the group slug none others.
Code:
=TEXTJOIN(", ",TRUE,IF(B3:B500=D3,A2:A500,""))
[TABLE="width: 1256"]
<colgroup><col style="mso-width-source:userset;mso-width-alt:20821;width:488pt" width="651"> <col style="mso-width-source:userset;mso-width-alt:8490;width:199pt" width="265"> <col style="width:65pt" width="87"> <col style="mso-width-source:userset;mso-width-alt:21504;width:504pt" width="672"> </colgroup><tbody>[TR]
[TD="class: xl68, width: 651"]URL
[/TD]
[TD="class: xl68, width: 265"]Group[/TD]
[TD="class: xl69, width: 87"][/TD]
[TD="class: xl68, width: 672"]URL[/TD]
[/TR]
[TR]
[TD="class: xl66"]https://deserthopetreatment.com/[/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl66"]https://deserthopetreatment.com/[/TD]
[/TR]
[TR]
[TD="class: xl67"]https://deserthopetreatment.com/addiction-recovery-program-overview/specialized-treatment/[/TD]
[TD]addiction-recovery-program-overview[/TD]
[TD][/TD]
[TD="class: xl67"]https://deserthopetreatment.com/addiction-recovery-program-overview/specialized-treatment/[/TD]
[/TR]
[TR]
[TD="class: xl66"]https://deserthopetreatment.com/lsd/[/TD]
[TD]lsd[/TD]
[TD][/TD]
[TD="class: xl66"]https://deserthopetreatment.com/lsd/[/TD]
[/TR]
[TR]
[TD="class: xl67"]https://deserthopetreatment.com/drug-abuse/pregnancy/[/TD]
[TD]drug-abuse[/TD]
[TD][/TD]
[TD="class: xl67"]https://deserthopetreatment.com/drug-abuse/pregnancy/[/TD]
[/TR]
[TR]
[TD="class: xl66"]https://deserthopetreatment.com/marijuana/[/TD]
[TD]marijuana[/TD]
[TD][/TD]
[TD="class: xl66"]https://deserthopetreatment.com/marijuana/[/TD]
[/TR]
[TR]
[TD="class: xl67"]https://deserthopetreatment.com/drug-abuse/[/TD]
[TD]drug-abuse[/TD]
[TD][/TD]
[TD="class: xl67"]https://deserthopetreatment.com/drug-abuse/[/TD]
[/TR]
[TR]
[TD="class: xl65"]https://deserthopetreatment.com/drug-recovery/inpatient/[/TD]
[TD]drug-recovery[/TD]
[TD][/TD]
[TD="class: xl65"]https://deserthopetreatment.com/drug-recovery/inpatient/[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 1256"]
<colgroup><col style="mso-width-source:userset;mso-width-alt:20821;width:488pt" width="651"> <col style="mso-width-source:userset;mso-width-alt:8490;width:199pt" width="265"> <col style="width:65pt" width="87"> <col style="mso-width-source:userset;mso-width-alt:21504;width:504pt" width="672"> </colgroup><tbody>[TR]
[TD="class: xl66, width: 651"]https://deserthopetreatment.com/admissions/what-to-expect/[/TD]
[TD="width: 265"]admissions[/TD]
[TD="width: 87"][/TD]
[TD="class: xl66, width: 672"]https://deserthopetreatment.com/admissions/what-to-expect/[/TD]
[/TR]
[TR]
[TD="class: xl65"]https://deserthopetreatment.com/ptsd-substance-abuse/[/TD]
[TD]ptsd-substance-abuse[/TD]
[TD][/TD]
[TD="class: xl65"]https://deserthopetreatment.com/ptsd-substance-abuse/[/TD]
[/TR]
[TR]
[TD="class: xl66"]https://deserthopetreatment.com/guides/[/TD]
[TD]guides[/TD]
[TD][/TD]
[TD="class: xl66"]https://deserthopetreatment.com/guides/[/TD]
[/TR]
[TR]
[TD="class: xl65"]https://deserthopetreatment.com/addiction-recovery-program-overview/aftercare/[/TD]
[TD]addiction-recovery-program-overview[/TD]
[TD][/TD]
[TD="class: xl65"]https://deserthopetreatment.com/addiction-recovery-program-overview/aftercare/[/TD]
[/TR]
[TR]
[TD="class: xl66"]https://deserthopetreatment.com/bpd-substance-abuse/[/TD]
[TD]bpd-substance-abuse[/TD]
[TD][/TD]
[TD="class: xl66"]https://deserthopetreatment.com/bpd-substance-abuse/[/TD]
[/TR]
[TR]
[TD="class: xl65"]https://deserthopetreatment.com/ocd-substance-abuse/[/TD]
[TD]ocd-substance-abuse[/TD]
[TD][/TD]
[TD="class: xl65"]https://deserthopetreatment.com/ocd-substance-abuse/[/TD]
[/TR]
[TR]
[TD="class: xl66"]https://deserthopetreatment.com/addiction-recovery-program-overview/therapy-types/[/TD]
[TD]addiction-recovery-program-overview[/TD]
[TD][/TD]
[TD="class: xl66"]https://deserthopetreatment.com/addiction-recovery-program-overview/therapy-types/[/TD]
[/TR]
[TR]
[TD="class: xl65"]https://deserthopetreatment.com/addiction-recovery-program-overview/[/TD]
[TD]addiction-recovery-program-overview[/TD]
[TD][/TD]
[TD="class: xl65"]https://deserthopetreatment.com/addiction-recovery-program-overview/[/TD]
[/TR]
</tbody>[/TABLE]
<style>table { }tr { }col { }br { }td { padding-top: 1px; padding-right: 1px; padding-left: 1px; color: black; font-size: 12pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; vertical-align: bottom; border: medium none; white-space: nowrap; }.xl65 { border-color: rgb(142, 169, 219) currentcolor rgb(142, 169, 219) rgb(142, 169, 219); border-style: solid none solid solid; border-width: 0.5pt medium 0.5pt 0.5pt; background: rgb(217, 225, 242) none repeat scroll 0% 0%; }.xl66 { border-color: rgb(142, 169, 219) currentcolor rgb(142, 169, 219) rgb(142, 169, 219); border-style: solid none solid solid; border-width: 0.5pt medium 0.5pt 0.5pt; }</style><style>table { }tr { }col { }br { }td { padding-top: 1px; padding-right: 1px; padding-left: 1px; color: black; font-size: 12pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; vertical-align: bottom; border: medium none; white-space: nowrap; }.xl65 { border-color: rgb(142, 169, 219) currentcolor rgb(142, 169, 219) rgb(142, 169, 219); border-style: solid none solid solid; border-width: 0.5pt medium 0.5pt 0.5pt; background: rgb(226, 239, 218) none repeat scroll 0% 0%; }.xl66 { border-color: rgb(142, 169, 219) currentcolor rgb(142, 169, 219) rgb(142, 169, 219); border-style: solid none solid solid; border-width: 0.5pt medium 0.5pt 0.5pt; background: rgb(217, 225, 242) none repeat scroll 0% 0%; }.xl67 { border-color: rgb(142, 169, 219) currentcolor rgb(142, 169, 219) rgb(142, 169, 219); border-style: solid none solid solid; border-width: 0.5pt medium 0.5pt 0.5pt; }.xl68 { font-weight: 700; text-align: center; }.xl69 { font-weight: 700; }</style>