Forum Discussion
JennyHoA20181
Apr 24, 2023Brass Contributor
If formula for contains specific text
Hello all!
Please can you advise how to construct the formula in COLUMN F attached to show:
IF Program: Account Name Contains "Executive" then "Exec", ELSEIF Degree Level = Undergraduate then "UG" ELSEIF Degree Level = Postgraduate then "PG"
Thanks in advance for your help!
Jenny
Sub Copy() Dim l As Long l = Worksheets("Sheet2").Range("A1").End(xlDown).Row Worksheets("Sheet1").Range("A39:S39").Copy _ Destination:=Worksheets("Sheet2").Cells(l, 1).Offset(1, 0) End Sub
You can try this code. In sheet2 i've added values "x" in cells A1, A2 and A3 in order to make the End(xlDown) command return the expected row number.