Excel Clear Unprotected Cells

J

jeaniekb

Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel

I have a form that we use for bidding. After each bid, I would like to clear each unprotected cell--WITHOUT--clearing its formatting, formulas, etc. Many of these cells are drop-down boxes. But I can't find any clear commands for Applescript that don't clear the formatting & formulas! In Excel 2007 for PC, I simply used the term "clear contents".

Any help would be great! THANK YOU!
 
B

Bob Greenblatt

Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel

I have a form that we use for bidding. After each bid, I would like to clear
each unprotected cell--WITHOUT--clearing its formatting, formulas, etc. Many
of these cells are drop-down boxes. But I can't find any clear commands for
Applescript that don't clear the formatting & formulas! In Excel 2007 for PC,
I simply used the term "clear contents".

Any help would be great! THANK YOU!
On the Mac, clearcontents is the same as the PC. However, both will indeed
remove the formulas. I think you are not quite accurate in your description.
You should be able to organize your sheet so the entry values are in one
place and easily cleared.
 
C

CyberTaz

As Bob G suggests, your scant description leaves the field wide open as to
possibilities. A more detailed indication of the specific as well as general
requirements would attract far more useful suggestions. From what you've
indicated so far I'd think the best solution would be to simply close the
file without saving changes... but I'm sure you are looking for something
more than that -- we just have no idea what that may be.
 
J

JE McGimpsey

Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel

I have a form that we use for bidding. After each bid, I would like to clear
each unprotected cell--WITHOUT--clearing its formatting, formulas, etc. Many
of these cells are drop-down boxes. But I can't find any clear commands for
Applescript that don't clear the formatting & formulas! In Excel 2007 for PC,
I simply used the term "clear contents".

Any help would be great! THANK YOU!

Perhaps:

tell application "Microsoft Excel"
tell active sheet's used range
set rng to special cells cells type cell type constants
clear contents rng
end tell
end tell
 

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

Top