Macro that sorts

H

Hawkfan757

I have a spreadsheet that data will be inputted in columns A thru C. Columns
D thru F have formulas in them that I do not want to get messed up so I have
protected these cells. My problem is I want the user of this spreadsheet to
enter data into columns A thru C and then to sort the data, but the data
cannot be sorted since I have protected columns D thru F. My next thought was
that I could create a macro that would unprotect the cells, input the
password, sort the data, and then protect the cells again with the password I
have provided. However, I can not make this work unless I do not use a
password for the protected cells. Does anybody have any ideas for how I could
accomplish this? Your help is greatly appreciated.
 
F

Frank Kabel

Hi
you could unprotect with
activesheet.unprotect password:="your_password"
 

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