clear contiguous fields with one keystroke

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Excel 2003 Using spreadsheet in modeling application. Need to reenter 14
new parameters frequently. They are contiguous. Would like to hit one key
and have all input fields reset to blank or zero.
 
You could drop a button from the Forms toolbar on the worksheet that has a macro
assigned to it.

Option Explicit
Sub ClearZeroCells()
with activesheet
.range("a1,b9,c3:c5").clearcontents
.range("a3,b12,d1:d5").value = 0
end with
end sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top