For example , i want to remove all string in line 10 below . What the VBA code can be use?
The simplest approach is to go to menu Developer, click "Record macro" and do the action you want to do (that is remove string in row 10). Then you click "stop recording", click "Macros", select Macro1 and click the button Edit. A new window opens with VBA code that does what you just recorded. In your case the code is
Sub Macro1()
Range("A10").Select
Selection.ClearContents
End Sub
This is where you start. Then you can play with the code and further adjust it to your needs.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.