DELETED_5350

Without knowing your layout etc, you should be able to get somewhere with this

Code:
Sub test()
Dim myrow As Integer
Dim match As Integer
'starting row - my example had a header row
myrow = 2

'the end cell - we could use vba to find the last cell but im being lazy and hardcoding it
Do Until myrow = 7
myvalue = Range("E" & myrow).Value
match = "0"
match = InStr(1, myvalue, "tel", vbTextCompare)
If match > "0" Then
    If Range("J" & myrow).Value = "" Then Range("J" & myrow).Value = myvalue
End If

myvalue = Range("F" & myrow).Value
match = "0"
match = InStr(1, myvalue, "fax", vbTextCompare)
If match > "0" Then
    If Range("H" & myrow).Value = "" Then Range("K" & myrow).Value = myvalue
End If

myrow = myrow + 1

Loop


End Sub
 
Back
Top Bottom