Hi.
I have put together some code lines I found while searching web, on how a value is returned after 2 conditions are met. I would like to develop further the below code in order to strike-through the returned value.
I will appreciated if someone can help me.
Function Lookup_concat(Search_string As String, _
Search_in_col As Range, Return_val_col As Range)
Dim i As Long
Dim result As String
For i = 1 To Search_in_col.Count
If Search_in_col.Cells(i, 1) = Search_string And Search_in_col.Cells(i, 3) = 100 Then
result = result & "> " & Return_val_col.Cells(i, 1).Value & vbNewLine
\\\ need to strike-through Return_val_col.Cells(i, 1).Value at this point
ElseIf Search_in_col.Cells(i, 1) = Search_string Then
result = result & Return_val_col.Cells(i, 1).Value & vbNewLine
End If
Next
Lookup_concat = Trim(result)
End Function
Thx
I have put together some code lines I found while searching web, on how a value is returned after 2 conditions are met. I would like to develop further the below code in order to strike-through the returned value.
I will appreciated if someone can help me.
Function Lookup_concat(Search_string As String, _
Search_in_col As Range, Return_val_col As Range)
Dim i As Long
Dim result As String
For i = 1 To Search_in_col.Count
If Search_in_col.Cells(i, 1) = Search_string And Search_in_col.Cells(i, 3) = 100 Then
result = result & "> " & Return_val_col.Cells(i, 1).Value & vbNewLine
\\\ need to strike-through Return_val_col.Cells(i, 1).Value at this point
ElseIf Search_in_col.Cells(i, 1) = Search_string Then
result = result & Return_val_col.Cells(i, 1).Value & vbNewLine
End If
Next
Lookup_concat = Trim(result)
End Function
Thx