Forum Discussion
nancynancy
Feb 07, 2024Copper Contributor
Copying conditional formatting / Changing absolute to relative
Hello - I am trying to copy a conditional format down through multiple rows but cannot get my conditional formula to change to relative, it keeps reverting back to absolute. Is this something not po...
smylbugti222gmailcom
Feb 07, 2024Iron Contributor
While copying conditional formatting across multiple rows in a pivot table can be tricky due to the dynamic nature of pivot tables, there are workarounds to achieve your desired results. Here are two approaches:
Method 1: Using Formula Auditing:
- Select the cell(s) with the conditional formatting you want to copy.
- Go to the Formulas tab and click Formula Auditing > Show Formulas.
- The formula will be displayed in the formula bar.
- Make sure the formula uses relative cell references (e.g., A2-B2 instead of $A$2-$B$2). If it's absolute, manually change it to be relative.
- Click anywhere outside the formula bar to apply the changes.
- Copy the cells with the adjusted formula.
- Paste the copied cells into the target rows in your pivot table.
Method 2: Using Conditional Formatting Rules:
- Select the cell(s) with the conditional formatting you want to copy.
- Go to the Home tab and click Conditional Formatting.
- Choose the appropriate formatting rule type (e.g., "Highlight Cells Rules" or "New Rule").
- In the rule dialog box, pay attention to the formatting formula. Ensure it uses relative references.
- Click Format to choose your desired formatting.
- Click OK to close the rule dialog box.
- Select the target rows in your pivot table.
- Click Conditional Formatting again and choose the same rule type you used in step 3.
- Instead of creating a new rule, select the existing rule you just edited.
- Click OK to apply the rule to the new cells.
Remember that pivot tables automatically adjust references when you add or remove data, so it's good practice to use relative references in your conditional formatting formulas.
Additional Tips:
- If you're working with a large pivot table, consider using the Format Painter (Home tab > Paintbrush icon) to copy the formatting instead of individual formulas. This can be faster and less error-prone.
- Make sure your pivot table settings allow updates to formatting when data changes. Go to PivotTable Analyze > Change Data Source and check the "Refresh data when opening the file" box.
I hope these methods help you successfully copy conditional formatting across your pivot table with relative references!