How to delete one conditional formatting out of several in a user friendly manner (to be used in a form)

limah82

New Member
Joined
Jun 20, 2019
Messages
17
Dear All,

I am trying to create a form in excel that users will fill and print. I prefer excel rather than pdf because it as some calculation forms.

I have applied some conditionnal formating including one rule to highlight the unprotected cells (to help the user identifying which fields to complete)

The users will need to print the form once finish but I would like this specific rule not to be printed.

I am trying to find the best way to allow the users to manage this task easily.

Thanks for your help
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
There is a very simple way to to this (provided that nothing else conflicts with it)
Conditional formatting rules are applied in a particular sequence and we can manipulate that
Use 2 rules on the same range of cells and toggle rule priorities

METHOD
Select all the cells being formatted by CF then type MyNamedRange in the name box (the box above cell A1) and click enter
- this simply creates a named range which is easily referred to in VBA
With those same cells highlighed add another rule to set the formatting back to normal
Set fill colour to none as the CF format

OneEqualsOne.jpg




Then insert the code to toggle priorities in the PDF macro
Rich (BB code):
REMOVE FORMATTING BY changing priority
    With [mynamedrange]
        .FormatConditions(2).SetFirstPriority
        .FormatConditions(1).StopIfTrue = False
    End With

INSTRUCTIONS TO PRINT TO PDF GO HERE

RE-INSTATED FORMATTING
    With [mynamedrange]
        .FormatConditions(2).SetFirstPriority
        .FormatConditions(1).StopIfTrue = False
    End With

FOR INFO ONLY

cf rule.jpg
 
Upvote 0
Dear Yongle,

thank you very much for your help. the formula works perfectly. (I just had to set the first formatconditions stopiftrue to true rather than false
 
Upvote 0

Forum statistics

Threads
1,214,631
Messages
6,120,640
Members
448,974
Latest member
DumbFinanceBro

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top