Avatar of Frank .S
Frank .S
Flag for Australia asked on

excel - protect column & ifstatements

hi experts, could you please help with the attached excel workbook, id like to;
- protect a column with a pwd protection to edit the cells in this column
- add ifstatement to the worksheet so that if it meets a criteria certain cells are colored according to the criteria
C--Users-frank.sasso-zFrank-Folder-.xlsx
* if statementsMicrosoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
Joe Howard

8/22/2022 - Mon
Joe Howard

You are asking for two entirely unrelated things.

1. Select the column, bring up the Format Cells dialog box again (Ctrl+Shift+F), select the Locked box and then click OK, on the Review tab, in the Changes group, click Protect Sheet.
2. Use conditional formatting: http://www.excel-easy.com/data-analysis/conditional-formatting.html
Frank .S

ASKER
hi macroshadow, ive had a look at the conditional formatting link you have posted in your comment but i cant see if in a range of cells you can apply multiple conditions for example if the date = or is 1 day less than what is shown in the cell then its hilited a certain color?
Joe Howard

Yes, it is possible using a formula.
The formula must return true for the formatting to be applied.
https://exceljet.net/conditional-formatting-with-formulas
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Frank .S

ASKER
hi experts, could you tell me how i apply more than 1 condition to a range of cells through conditional formatting, so for example if cells a1:a40 = "to check" then hilite cell fill color as red, or if = "checked" then cell fill color to be green or if cell = any other value show as yellow fill color
Joe Howard

If you want different formatting of the same cell depending on its contents, use multiple rules.
Frank .S

ASKER
hi macroshadow, im using excel 2007 and i cant work out how to use multiple rules, could you assist?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Frank .S

ASKER
hi, ive added 2 conditional formats into my wksht in column 'e' but its not working, could you please check why?
protect---ifstatements_2.xlsx
Joe Howard

I don't understand your requirements. Please fill in the blanks:

If cell in column e = f1 then fill cell(s) _____________ red
If cell in column e = f1 -1 then fill cell(s) _____________ yellow
If cells in column h = "to check" then fill cell(s) _____________ red
If cells in column h = "checked" then  fill cell(s) _____________ green

Also note that both column e and f1 contain numbers not dates.
Frank .S

ASKER
hi macroshadow,

If cell in column e = f1 then fill cell(s) _____________ red
If cell in column e = f1 -1 then fill cell(s) _____________ yellow
If cells in column h = "to check" then fill cell(s) _____________ red
If cells in column h = "checked" then  fill cell(s) _____________ green

yes these are the requirements above and if you open my conditional formatting/ manage rules the conditions dont work, there is obviously something missing, can you pick up the error/s?
I changed column e & f1 to number to see if my conditional formatting would work but still does not.
Your help has saved me hundreds of hours of internet surfing.
fblack61
Joe Howard

What cells should have the formatting applied to?
Frank .S

ASKER
the range of cells the formatting applies to is e3:e7 as shown in the screenshot below.
screenshot 1
Joe Howard

⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Frank .S

ASKER
there seems to be a misunderstanding, the formatting still applies to all cells in column 'e' but the conditions are 3;
1. if the cell value in col 'e' is = to or greater than the value in cell f1 then the background fill color is to be red
2. if the cell value in col 'e' is = to the value in cell f1 minus 1, then the background fill color is to be yellow
3. if the cell value in col 'e' doesnt meet condition 1 or 2 above then the background color is remain as normal, no formatting.
Joe Howard

That is not what you wrote above, you mentioned checked and to check.
Anyway, is this what you want?
protect---ifstatements_2.xlsx
Frank .S

ASKER
hi macroshadow, yes this is what i want but with cell values from numbers to dates. Ive attached the same workbook and the only change is the date values instead of numbers but it looks like all the conditional formats have been lost? i would have thought changing from numbers to dates wouldnt have changed the conditional formats?
protect---ifstatements_3.xlsx
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
ASKER CERTIFIED SOLUTION
Joe Howard

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Frank .S

ASKER
hi macroshadow, ive checked your last worksheet but the only thing that works are the dates in the table if = or > F1 then col e changes to red, if col e value = the date before F1 then shows in yellow.
col h doesnt work at all.
Joe Howard

I hope this is what you want.
protect---ifstatements_3.xlsx
Joe Howard

No answer has been accepted by the OP, but this post does exactly what the OP requested.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.