I have a worksheet that has 5 rules that change the color of a row based on formulas. When users paste data into the worksheet, the conditional formatting for these rules duplicates. How can I prevent that?
Also, How would I set up VBA to automatically check the sheet after changes and correct formatting that is incorrect?
Related
I have an Excel sheet protection set up with intricate conditional formats. I want to allow user input (typing) in a range of cells, but I want to disable copy/pasting in the same range.
2 reasons:
If a user copies from elsewhere and paste into this range, it destroys my conditional formatting. However, an unsophisticated user will never remember to use "paste value only".
If a user is in filtered view and copy and paste in a non-continuous range, the paste will overwrite values in hidden rows without the user even knowing, all they see is that some copied values "disappeared", thus changing values in hidden cells unintentionally.
Is this doable without VBA? because I need this to work with Excel Online with users using the file through SharePoint.
I have a worksheet with conditional formatting. I need to remove the conditional formulas, but when I do and they are gone, I save the sheet, exit, and re-load the sheet. When I check, the formulas are back. How can I get rid of them permanently?
I think you are removing rules from some selected cells. You can remove conditional formatting rules from entire sheet. See below screenshot.
I currently have a spreadsheet that has conditional formatting to change the colors of the rows, from column A-L, based upon the value of column "D" (Pending and Active change to yellow, Scheduled and Forwarded change to green, and Discontinued and Cancelled change to red).
I however have several worksheets in this once excel document which I would like to extend the same rules to. Is there a way to apply these rules to the other worksheets in the doc, or will I have to manually enter them for each doc?
Having a single rule apply to several sheets does not seem to be possible.
Source: http://excelribbon.tips.net/T003433_Applying_Conditional_Formatting_to_Multiple_Worksheets.html
It could be possible, however, to copy a conditional formatting rule you have set for one sheet to another (see link). The link's suggestions include
copying the conditional formatting - select the formatted cells in original sheet; click the Format Painter (on the Home tab of the ribbon); switch to the target worksheet; select the cells to which the formatting should be applied
macro recorder - run the macro recorder while setting up the conditional formatting; re-run the macro as you display each of your other worksheets. Detailed instructions:
go to View->Macros->Record Macro-OK
now add your conditional formatting rules to the current worksheet
go to View->Macros->Stop Recording
now you can switch to any sheet and apply the same formatting rules by executing your macro (View->Macros->View Macros->Run)
How can i use conditional formatting to extract data from other workbook?
I tried:
=IF(LEFT(B26,3)="SSS",VLOOKUP(B26,'XXX.xls!$A$4:$E$119,4,FALSE))
But I get this error message:
You may not link to other workbook via conditional formatting
What can I do with this situation? People out there mentioned "define name" but I'm not sure how can it be done.
Lets call the workbook where you want to enter the conditional format as MyWbk and the other one SrcWbk. This instructions are for excel 2007. Your mileage may vary.
Open both Workbooks
In MyWbk go to the Formulas Menu, and select Define Name
Enter in Name > testname
In the "Refers to" field, select click on the range selector (at right) and when the selector opens, select SrcWkb and then the cell you want as source for the format condition.
Accept the name creation
Go to the cell where you want to enter the conditional format
Select the Home Menu / Conditional Formatting / Manage Rules
Enter New Rule
Select "Use a formula to determine which cells to format"
Enter the formula you want, using the defined name. For example
=IF(testname=1,TRUE)
Select the desired formatting
Test the formula changing the value in SrcWbk
SAVE SrcWbk
You are done!
I just ran into this. The limitation is still there in Excel 2013.
But there is a workaround.
The limitation only exists in the Conditional Formatting editor.
The conditional formatting itself works just fine.
So in the editor, you can't refer to a defined range that refers to another workbook. You have to create the named range referring to your current workbook, define the conditional formatting that uses it, then when you are finished debugging it, change the defined range to the other workbook.
This isn't as bad as it sounds because it is easier to debug your formatting within the same sheet anyway.
This is only really a pain when you want to go back and change your formatting later.
I have some conditional formatting styles. I don't want to keep creating new rules for new ranges; I would rather follow DRY by declaring it once and referencing it elsewhere. I'm having difficulty doing this.
The conditional formatting rule works fine when it's just one range.
=Travel!$C$5:$P$8
However, I then try to add another range on another sheet, and it fails.
=Travel!$C$5:$P$8,Equipment!$B$5:$H$11
When I click "Apply", nothing happens on the spreadsheet, and the range for the rule in question resets itself to this:
=Travel!$C$5:$P$8
Is there a way to do this?
The same rule cannot apply to 2 different sheets at the same time. You'll have to create a separate rule for the Equipment sheet. I tried on a whim to create a named range that covered cells on 2 different sheets, then tried using that named range as the applies to range, but no luck.