M
mattg
Hi,
I'm trying to add some formulas with a macro. With the first I want the
value of "D2" to be "XXX" if the 3 left characters of cell "C2" are "YYY" but
I'm not sure of the correct syntax. This is what I have so far:
If Left.Range("c2", 3) = "095" Then .Range("D" & 2).Value = "ZB900"
..Range("D" & 2).Copy _
Destination:=.Range("D" & 2 & "" & lstrw)
In this next case I'm trying to load the formula:
..Range("E" & 2).Formula = "=("0"&right(c2,4))"
but I keep getting an error.
Any ideas?
I'm trying to add some formulas with a macro. With the first I want the
value of "D2" to be "XXX" if the 3 left characters of cell "C2" are "YYY" but
I'm not sure of the correct syntax. This is what I have so far:
If Left.Range("c2", 3) = "095" Then .Range("D" & 2).Value = "ZB900"
..Range("D" & 2).Copy _
Destination:=.Range("D" & 2 & "" & lstrw)
In this next case I'm trying to load the formula:
..Range("E" & 2).Formula = "=("0"&right(c2,4))"
but I keep getting an error.
Any ideas?