Hi All,
Please see code below... I have tried running this and obviously it doesn't work (likely for multiple reasons) however, I don't have the knowledge to know how to make this work. I feel like the logic is clear but obviously the way it is written is wrong... can anyone help?
Sub Refresh_A()
Dim rng As Range
Dim tm As Range
Dim d As Range
Set rng = Range("C9:C700")
Set tm = Range("D2")
Set d = Range("D3")
For Each cell In tm
If cell.Value = "Summary" Then
For Each cell In rng
If cell.Value <> "" Then
cell.Offset(0, 15).Value = "B Summary"
cell.Offset(0, 16).Value = "B Summary"
Else
For Each cell In d
If cell.Value = "Summary" Then
For Each cell In rng
If cell.Value <> "" Then
cell.Offset(0, 15).Value = "Summary of TM"
cell.Offset(0, 16).Value = "Summary of TM"
Else
For Each cell In rng
If cell.Value <> "" Then
cell.Offset(0, 15).Value = "TM D Product"
cell.Offset(0, 16).Value = "TM D Product"
End If
Next
Range("A1").Select
End Sub
Please see code below... I have tried running this and obviously it doesn't work (likely for multiple reasons) however, I don't have the knowledge to know how to make this work. I feel like the logic is clear but obviously the way it is written is wrong... can anyone help?
Sub Refresh_A()
Dim rng As Range
Dim tm As Range
Dim d As Range
Set rng = Range("C9:C700")
Set tm = Range("D2")
Set d = Range("D3")
For Each cell In tm
If cell.Value = "Summary" Then
For Each cell In rng
If cell.Value <> "" Then
cell.Offset(0, 15).Value = "B Summary"
cell.Offset(0, 16).Value = "B Summary"
Else
For Each cell In d
If cell.Value = "Summary" Then
For Each cell In rng
If cell.Value <> "" Then
cell.Offset(0, 15).Value = "Summary of TM"
cell.Offset(0, 16).Value = "Summary of TM"
Else
For Each cell In rng
If cell.Value <> "" Then
cell.Offset(0, 15).Value = "TM D Product"
cell.Offset(0, 16).Value = "TM D Product"
End If
Next
Range("A1").Select
End Sub