Dear Expert Excel person,
I need you help me to find some solution, I try to write a macro as below :
Sub Insrt_MatType()
Dim Found As Range
Dim LR As Long
Set Found = Rows(1).Find(what:="Material description", LookIn:=xlValues, lookat:=xlWhole)
If Found Is Nothing Then Exit Sub
LR = Cells(Rows.Count, Found.Column).End(xlUp).Row
Found.Offset(, 1).EntireColumn.Insert
Cells(1, Found.Column + 1).Value = "Material type"
Range(Cells(2, Found.Column + 1), Cells(LR, Found.Column + 1)).Formula = "=IF(ISNUMBER(FIND("S",A2)),"Sample",IF(ISNUMBER(FIND("Z",A2)),"Sample",IF(ISNUMBER(FIND("T",A2)),"Tester",IF(ISNUMBER(FIND("Y",A2)),"Tester","FG"))))"
End Sub
I need to insert column and add formula in the new column and copy formula down, but I cannot add formula in this macro.
i do not how can solve this one, i need you advice me this case.
And I have attached Excel file, can you see in Tab sheet Raw data.
Best regards,
Bookmarks