Hi,
Firstly thanks for looking
I have a spreadsheet were I need to reset a range of cells, I have recorded a macro (see below) which will reset the range. There are 1100 ranges in total.
What I am asking is, is there a way to click on a cell, any cell and run the below code. I know the code will need to be manipulated but I have no idea how. I have Googled for an answer but I'm more confused then when I started looking.
Thank you in advance for helping/looking,
Ben
Firstly thanks for looking
I have a spreadsheet were I need to reset a range of cells, I have recorded a macro (see below) which will reset the range. There are 1100 ranges in total.
What I am asking is, is there a way to click on a cell, any cell and run the below code. I know the code will need to be manipulated but I have no idea how. I have Googled for an answer but I'm more confused then when I started looking.
Code:
Sub resetRange()
'
' resetRange Macro
'
' Keyboard Shortcut: Ctrl+o
'
Range("AJZ135").Select
Selection.ClearContents
Range("AKA135").Select
Selection.ClearContents
Range("AKB135").Select
Selection.ClearContents
Range("AKC135").Select
Selection.ClearContents
Range("AKD135").Select
Selection.ClearContents
Range("AKE135").Select
Selection.ClearContents
Range("AKF135").Select
Selection.ClearContents
Range("AKG135").Select
Selection.ClearContents
Range("AKH135").Select
Selection.ClearContents
Range("AKI135").Select
Selection.ClearContents
Range("AKJ135").Select
Selection.ClearContents
Range("AKK135").Select
Selection.ClearContents
Range("AKL135").Select
Selection.ClearContents
Range("AKM135").Select
Selection.ClearContents
Range("AJZ136").Select
ActiveCell.FormulaR1C1 = "12:00:00 AM"
Range("AKA136").Select
ActiveCell.FormulaR1C1 = "12:00:00 AM"
Range("AKB136").Select
ActiveCell.FormulaR1C1 = "12:00:00 AM"
Range("AKC136").Select
ActiveCell.FormulaR1C1 = "12:00:00 AM"
Range("AKD136").Select
ActiveCell.FormulaR1C1 = "12:00:00 AM"
Range("AKE136").Select
ActiveCell.FormulaR1C1 = "12:00:00 AM"
Range("AKF136").Select
ActiveCell.FormulaR1C1 = "12:00:00 AM"
Range("AKG136").Select
ActiveCell.FormulaR1C1 = "12:00:00 AM"
Range("AKH136").Select
ActiveCell.FormulaR1C1 = "12:00:00 AM"
Range("AKI136").Select
ActiveCell.FormulaR1C1 = "12:00:00 AM"
Range("AKJ136").Select
ActiveCell.FormulaR1C1 = "12:00:00 AM"
Range("AKK136").Select
ActiveCell.FormulaR1C1 = "12:00:00 AM"
Range("AKL136").Select
ActiveCell.FormulaR1C1 = "12:00:00 AM"
Range("AKM136").Select
ActiveCell.FormulaR1C1 = "12:00:00 AM"
Range("AKA137").Select
ActiveCell.FormulaR1C1 = "12:00:00 AM"
Range("AKC137").Select
ActiveCell.FormulaR1C1 = "12:00:00 AM"
Range("AKE137").Select
ActiveCell.FormulaR1C1 = "12:00:00 AM"
Range("AKG137").Select
ActiveCell.FormulaR1C1 = "12:00:00 AM"
Range("AKI137").Select
ActiveCell.FormulaR1C1 = "12:00:00 AM"
Range("AKK137").Select
ActiveCell.FormulaR1C1 = "12:00:00 AM"
Range("AKM137").Select
ActiveCell.FormulaR1C1 = "12:00:00 AM"
Range("AKM3").Select
End Sub
Thank you in advance for helping/looking,
Ben