Hi! So I have a situation, I am currently trying to pull out hyperlinks (that are not linked so they are just text in a cell) from multiple cells that link to a website called jama. They are all contained in a column N and there are some that have one link and then another that contains multiple for example:
"Random sting of text that is supposed to represent a message here:
[https://jama.prz.ife.eu-west-1.aws.thales/pages/vie*
+Related Requirements:+
[https://jama.prz.ife.eu-wes*
[https://jama.prz*
[https://jama.prz.ife.eu-west-1.aws*"
So currently I am trying to brain storm a code that could extract each of these hyperlinks based on the string "jama" and if there are multiple then add a row and put the next one in that corresponding cell under the first cell... Like so:
from
[TABLE="class: k-table, width: 979"]
<tbody>[TR]
[TD]ID[/TD]
[TD] [https://jama.prz.ife.eu-west-1.aws.thales/pages/vie*
+Related Requirements:+
[https://jama.prz.ife.eu-wes*
[https://jama.prz*
[https://jama.prz.ife.eu-west-1.aws*"[/TD]
[/TR]
</tbody>[/TABLE]
to
[TABLE="class: k-table, width: 979"]
<tbody>[TR]
[TD]ID[/TD]
[TD] https://jama.prz.ife.eu-west-1.aws.thales/pages/vie*[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]https://jama.prz.ife.eu-wes*[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]https://jama.prz*[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]https://jama.prz.ife.eu-west-1.aws*"[/TD]
[/TR]
</tbody>[/TABLE]
I was reading up on this and someone had written a code (below) however I am having trouble using it. Anything Helps, let me know if I need to explain further
Function MultipleLookupNoRept(Lookupvalue As String, LookupRange As Range, ColumnNumber As Integer)
Dim i As Long
Dim Result As String
For i = 1 To LookupRange.Columns(1).Cells.Count
If LookupRange.Cells(i, 1) = Lookupvalue Then
For j = 1 To i - 1
If LookupRange.Cells(j, 1) = Lookupvalue Then
If LookupRange.Cells(j, ColumnNumber) = LookupRange.Cells(i, ColumnNumber) Then
GoTo Skip
End If
End If
Next j
Result = Result & " " & LookupRange.Cells(i, ColumnNumber) & ","
Skip:
End If
Next i
MultipleLookupNoRept = Left(Result, Len(Result) - 1)
End Function
also posted on Microsoft Community: https://answers.microsoft.com/en-us...-f750-44b4-b2d9-26e66bc33d9f?tm=1562793663806
"Random sting of text that is supposed to represent a message here:
[https://jama.prz.ife.eu-west-1.aws.thales/pages/vie*
+Related Requirements:+
[https://jama.prz.ife.eu-wes*
[https://jama.prz*
[https://jama.prz.ife.eu-west-1.aws*"
So currently I am trying to brain storm a code that could extract each of these hyperlinks based on the string "jama" and if there are multiple then add a row and put the next one in that corresponding cell under the first cell... Like so:
from
[TABLE="class: k-table, width: 979"]
<tbody>[TR]
[TD]ID[/TD]
[TD] [https://jama.prz.ife.eu-west-1.aws.thales/pages/vie*
+Related Requirements:+
[https://jama.prz.ife.eu-wes*
[https://jama.prz*
[https://jama.prz.ife.eu-west-1.aws*"[/TD]
[/TR]
</tbody>[/TABLE]
to
[TABLE="class: k-table, width: 979"]
<tbody>[TR]
[TD]ID[/TD]
[TD] https://jama.prz.ife.eu-west-1.aws.thales/pages/vie*[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]https://jama.prz.ife.eu-wes*[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]https://jama.prz*[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]https://jama.prz.ife.eu-west-1.aws*"[/TD]
[/TR]
</tbody>[/TABLE]
I was reading up on this and someone had written a code (below) however I am having trouble using it. Anything Helps, let me know if I need to explain further
Function MultipleLookupNoRept(Lookupvalue As String, LookupRange As Range, ColumnNumber As Integer)
Dim i As Long
Dim Result As String
For i = 1 To LookupRange.Columns(1).Cells.Count
If LookupRange.Cells(i, 1) = Lookupvalue Then
For j = 1 To i - 1
If LookupRange.Cells(j, 1) = Lookupvalue Then
If LookupRange.Cells(j, ColumnNumber) = LookupRange.Cells(i, ColumnNumber) Then
GoTo Skip
End If
End If
Next j
Result = Result & " " & LookupRange.Cells(i, ColumnNumber) & ","
Skip:
End If
Next i
MultipleLookupNoRept = Left(Result, Len(Result) - 1)
End Function
also posted on Microsoft Community: https://answers.microsoft.com/en-us...-f750-44b4-b2d9-26e66bc33d9f?tm=1562793663806