Hi,
I'm trying to get rid of code that places formulas in cells. One of the formulas I have is sheet1.Range("M3:M" & LastrowC).Formula = "=weeknum(K3)"
I tried to massage the code below, but had no luck. Any suggestions?
This works:
With sheet1.Range("L3:L" & LastrowC)
.Value = Evaluate(Replace("if(@<>"""",text(@,""MMMM""),"""")", "@", .Offset(, -1).Address))
End With
This doesn't:
With sheet1.Range("M3:M" & LastrowC)
.Value = Evaluate(Replace("if(@<>"""",weeknum(@),"""")", "@", .Offset(, -2).Address))
End With
I'm trying to get rid of code that places formulas in cells. One of the formulas I have is sheet1.Range("M3:M" & LastrowC).Formula = "=weeknum(K3)"
I tried to massage the code below, but had no luck. Any suggestions?
This works:
With sheet1.Range("L3:L" & LastrowC)
.Value = Evaluate(Replace("if(@<>"""",text(@,""MMMM""),"""")", "@", .Offset(, -1).Address))
End With
This doesn't:
With sheet1.Range("M3:M" & LastrowC)
.Value = Evaluate(Replace("if(@<>"""",weeknum(@),"""")", "@", .Offset(, -2).Address))
End With