Macro?

mscanavino

New Member
Joined
Sep 6, 2011
Messages
2
Hey guys i have no clue really how to do macros but i need help with this macro for work.


I have a spreadsheet that has values in currency, percentages, and text fields. What I need the macro to do is at a certain time (id like to pick the time) is clear the cell values but keep the formats of each cell.

if you have any questions please ask thanks
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Just click at the top of your page which highlights the whole spreadsheet and click the delete button, the values are deleted, however the formatting is retained.
 
Upvote 0
But I don't want the whole spreadsheet to be erased just a certain range of cells. I would like it to be automatically erased at like 3 in the morning and then saved so it is like a new spreadsheet for the next day. You get what i mean?
 
Upvote 0
For something to run at 3.00am in the morning you are best to use windows task scheduler and when it opens the workbook then it will run the delete code for your range or you can use a wintimer, but windows scheduler would be best, use google to look up windows scheduler.
 
Upvote 0
Welcome to the Board!

I agree with using the Windows Scheduler. As for the code itself you can record a macro doing what you want, then call it in the Open event, which will fire if you have Scheduler open the workbook.

HTH,
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,696
Members
452,938
Latest member
babeneker

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top