Hello,
Could I please have some help to combine the subsequent cells strings until the next cell contains a “:” or while the subsequent cell doesn’t contain a “:”
Im trying to combine multiple cells from a column into 1 cell after 2 cases are meet
The first case is that it finds “Issue Options” and brings across is value – this works
The part which is what I need help with is that I need it to combine the subsequent cells strings until the next cell contains a “:” or while the subsequent cell doesn’t contain a “:”
Unfortunetly i cant just say bring across this cell and the next one down as their can be 2,3,4,5, ect options
Could someone please help? I’ve never used “Do While” or “Do Until”
Example Sheet Instring and Do While.xlsm (this is an extract)
Working Code for first part
Public Function FindIssueOptions(LetterText As Range) As String
Dim LetterCell As Range
For Each LetterCell In LetterText
If InStr(1, LetterCell.Value, ":") > 0 Then
Dim variableName As String
variableName = Trim(Left(LetterCell.Value, InStr(1, LetterCell.Value, ":") - 1))
Select Case variableName
Case "ISSUE OPTIONS"
FindIssueOptions = Trim(LetterCell.Value)
Case Else
' DO NOTHING
End Select
End If
Next LetterCell
End Function
Bookmarks