Hi experts,
I have a data ranging from Column A to Column BX.
I am trying to insert a column M (which already has a data) and put the value "Gross Sales" in M4. The VBA code that I have created, however, adds the column all the time since the code is run for multiple times for updating other operations. I have the following code and want to put a check event which checks Column M if value "Gross Sales" is available or not. If it is available do nothing and if it is not then add Column M and set "Gross Sales" in Cell M4. I appreciate for codes that will stop addition if the value "Gross Sales" exist in Column M.
Dim sh1 As Worksheet
Set sh1 = Worksheets("Original Data_Processed")
sh1.Activate
On Error Resume Next
Range("M:M").Find(What:="Gross Sales").Select
Range("M:M").EntireColumn.Insert
Range("M4").Value = "Gross Sales"
On Error GoTo 0
End Sub
Thank you
Roshan Shakya
Bookmarks