From your sample file I gather it is only Column A to be cleared. Is that correct?
From your sample file I gather it is only Column A to be cleared. Is that correct?
Please consider:
Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .
Hi Winon
Hi
You just Solved it for me, I didn't realise in the code that if i adjust the fist number
Sub DeleDynamicGraphCols()
Application.ScreenUpdating = False
With Cells(1, Columns.Count).End(xlToLeft)
If .Column > 35 Then
Range(Cells(1, 35), .Offset(0, -1).Address).EntireColumn.Delete
End If
End With
Application.ScreenUpdating = True
End Sub
to the same column as the one i want remaining, it won't delete any past there "Offset -1"
After i went in to try and re create things for screen shots for you, as my actual spread sheet is set up different. Ha
Thanks Mate
Interaction helps
Solved
Mike. learning Vba slowly (Very)![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks