News:

Main Menu

Excel question

Started by DigiCorn, April 19, 2024, 09:15:02 AM

Previous topic - Next topic

0 Members and 6 Guests are viewing this topic.

DigiCorn

I have a spreadsheet I'm creating in Excel to track jobs through the shop. In it I have some formulas to math for me. Problem is, it's really easy to accidentally delete or erase the formula and screw up the cell, so is there a way (without locking or requiring a password) to protect the formula inside that cell so it doesn't lose it's format and can still be typed in to? I know how to lock it, but then you can't add any new information, and the only other trick I know requires a password every time you want to add new information. Also, without the use of a 3rd party plug-in, is there a way to make a cell have a date finder calendar?
"There's been a lot of research recently on how hard it is to dislodge an impression once it's been implanted in someone's mind. (This is why political attack ads don't have to be true to be effective. The other side can point out their inaccuracies, but the voter's mind privileges the memory of the original accusation, which was juicier than any counterargument ever could be.)"
― Johnny Carson

"Selling my soul would be a lot easier if I could just find it."
– Nikki Sixx

"Always do sober what you said you'd do drunk. That will teach you to keep your mouth shut."
― Ernest Hemingway

David

I thought you could lock cells without requiring a password.

QuoteLocking cells in Excel makes them non-editable by default. First, make sure the cells are unlocked by checking them under the Format cells menu. Then select the cell/range of cells you want to lock, locking them again under the format cells menu.
Enforce this by protecting the worksheet. Your select cells are non-editable now, without a password.
Prepress guy - Retired - Working from home
Livin' la Vida Loca

born2print

Can you rt. click the formula cell / format / lock
but then don't protect the whole sheet?
This does not require a PW until you want to unlock the cell.
HTH but I am no xls power user so :shrug:
All around me are familiar faces
Worn-out places, worn-out faces
Bright and early for their daily races
Going nowhere, going nowhere

DigiCorn

Well, I don't want a cell to be uneditable, but I do. I have a formula in the cell that does a math problem. I want the user to be forced to enter a number (not a letter - I want it to return an error), but not be able to edit or delete the math formula.
"There's been a lot of research recently on how hard it is to dislodge an impression once it's been implanted in someone's mind. (This is why political attack ads don't have to be true to be effective. The other side can point out their inaccuracies, but the voter's mind privileges the memory of the original accusation, which was juicier than any counterargument ever could be.)"
― Johnny Carson

"Selling my soul would be a lot easier if I could just find it."
– Nikki Sixx

"Always do sober what you said you'd do drunk. That will teach you to keep your mouth shut."
― Ernest Hemingway

Joe

Quote from: DigiCorn on April 19, 2024, 09:15:02 AMI have a spreadsheet I'm creating in Excel to track jobs through the shop. In it I have some formulas to math for me. Problem is, it's really easy to accidentally delete or erase the formula and screw up the cell, so is there a way (without locking or requiring a password) to protect the formula inside that cell so it doesn't lose it's format and can still be typed in to? I know how to lock it, but then you can't add any new information, and the only other trick I know requires a password every time you want to add new information. Also, without the use of a 3rd party plug-in, is there a way to make a cell have a date finder calendar?
Why would anyone need to type into the cell that has the formula? If they need to change the data they should change the values of the cell the formula is based upon.
Mac OS Sonoma 14.2.1 (c) | (retired)

The seven ages of man: spills, drills, thrills, bills, ills, pills and wills.

DigiCorn

Well, I have columns for prepress, wide format, scanning, press time and bindery. The formula in the final cell is the total hours. That one is locked and cannot be changed. In the other columns, I want the operator to enter their time in a XX.XX formatting. Right now if someone enters an "f" the cell accepts that (although in the total column I get an ERR, which is what should happen), and it displays as, "f." If you hit delete, it erases the formatting and formula.

I want to force that cell to display an ERR if anything other than a number is entered. And I want it to convert the number to a decimal (if they enter 5, I want it to display 5.00). I have 90% of it formatted correctly - just need to make it so you can only enter a number and can't delete the formatting. I have it currently defined as a number, but it's not working (see screenshots), and if you delete out the f, it blanks out the formatting.
"There's been a lot of research recently on how hard it is to dislodge an impression once it's been implanted in someone's mind. (This is why political attack ads don't have to be true to be effective. The other side can point out their inaccuracies, but the voter's mind privileges the memory of the original accusation, which was juicier than any counterargument ever could be.)"
― Johnny Carson

"Selling my soul would be a lot easier if I could just find it."
– Nikki Sixx

"Always do sober what you said you'd do drunk. That will teach you to keep your mouth shut."
― Ernest Hemingway

DigiCorn

OK... I figured out the number part of it through Data Validation, so now I just need to protect the cell, so they can enter a value, but not delete the formatting... it still removes it if you hit backspace or delete.
"There's been a lot of research recently on how hard it is to dislodge an impression once it's been implanted in someone's mind. (This is why political attack ads don't have to be true to be effective. The other side can point out their inaccuracies, but the voter's mind privileges the memory of the original accusation, which was juicier than any counterargument ever could be.)"
― Johnny Carson

"Selling my soul would be a lot easier if I could just find it."
– Nikki Sixx

"Always do sober what you said you'd do drunk. That will teach you to keep your mouth shut."
― Ernest Hemingway

Joe

I don't have Excel but I did the same with Libra Office and if you remove the formula because as I see it you don't need it because you can set the format for those cells like this for two decimal places.

Screenshot 2024-04-19 at 11.46.56 AM.png

Then under Data Validation set it like this.

Screenshot 2024-04-19 at 11.48.35 AM.png

If you enter a letter you will get an error. If you delete or back space it will only delete the data as there is no formula but it will not delete the data validation.
Mac OS Sonoma 14.2.1 (c) | (retired)

The seven ages of man: spills, drills, thrills, bills, ills, pills and wills.

DigiCorn

Here's what I see:

"There's been a lot of research recently on how hard it is to dislodge an impression once it's been implanted in someone's mind. (This is why political attack ads don't have to be true to be effective. The other side can point out their inaccuracies, but the voter's mind privileges the memory of the original accusation, which was juicier than any counterargument ever could be.)"
― Johnny Carson

"Selling my soul would be a lot easier if I could just find it."
– Nikki Sixx

"Always do sober what you said you'd do drunk. That will teach you to keep your mouth shut."
― Ernest Hemingway

Joe

Can you see these?
Mac OS Sonoma 14.2.1 (c) | (retired)

The seven ages of man: spills, drills, thrills, bills, ills, pills and wills.

DigiCorn

Those I can see, and now the original screenshots are showing up in the previous posting too.

I tested out my Excel template and I had actually done what you posted previously, and while it does blank out the cell (It shows empty vs the 0.00 it normally displays), if you go back and try to type a letter my little error window pops up, so it works. I *think* this is all I need for now. All my drop downs work, all my cells are protected from editing, and all the math adds up. Thanks!
"There's been a lot of research recently on how hard it is to dislodge an impression once it's been implanted in someone's mind. (This is why political attack ads don't have to be true to be effective. The other side can point out their inaccuracies, but the voter's mind privileges the memory of the original accusation, which was juicier than any counterargument ever could be.)"
― Johnny Carson

"Selling my soul would be a lot easier if I could just find it."
– Nikki Sixx

"Always do sober what you said you'd do drunk. That will teach you to keep your mouth shut."
― Ernest Hemingway

Joe

If you change your data validation to what is shown below and your cells are filled with 0.00 if the data validation fails, like if someone enters a letter, when you clear the error the cell will return the value to 0.00. It will make the cell blank if they have that cell selected and hit backspace or delete but really since the cell returns the value to 0.00 there is really no reason for them to hit backspace. Of course making anything idiot proof is impossible but that might help.
Mac OS Sonoma 14.2.1 (c) | (retired)

The seven ages of man: spills, drills, thrills, bills, ills, pills and wills.