Solved

Bizarre Conditional Formatting results

Posted on 2014-11-10
9
76 Views
Last Modified: 2014-11-16
All,

I have an Excel sheet with three conditional formatting rules to enable easier reading of the data portrayed in the sheet but am getting unexpected results.

Rule 1:
=$D3<>$D4  
compares a task reference in column D and adds a border to the bottom cell when the task reference changes

Rule 2:
=$A3=1  
in column A I have the following formula:

=IF(B3="","",IF(D3=D2,A2,ABS(IF(A2="",A1,A2)-1)))

This alternates the value in column A between 1 and 0 based on the change of task reference in column D. This then formats a shade of green for the lines equal to 1.  The appearrance of the report is now green and white shading alternating with change in task reference.

Rule 3:
=AND($D3<>"",ISERROR(IFERROR(MATCH($D3,LoL!$E:$E,0),MATCH($D3,Enabling!$E:$E,0))))

Checks that the Task reference is included in the summary reports on other sheets, if not it highlights red.

Rules 1 & 3 seem to work fine. However rule 2 works but some rows end up with a different shade of green.

See attached screen shot.

Any suggestions??

Thanks
Rob H
CF-Screen-shot.PNG
0
Comment
Question by:Rob Henson
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 25

Expert Comment

by:ProfessorJimJam
ID: 40433110
Please post your dummy example file
0
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40433115
What happens if you change the green color (say to blue). Do you have this difference in colors then?
0
 
LVL 25

Expert Comment

by:ProfessorJimJam
ID: 40433147
1 and 3 works becuase the result of the logical test, either is true or false or 1 or 0   which triggers the conditional formatting.

however, if you look are the 2 =IF(B3="","",IF(D3=D2,A2,ABS(IF(A2="",A1,A2)-1)))  

ABS(IF(A2="",A1,A2)-1))  this part would be fine, although i do not know the values of A1 and A2

IF(D3=D2,A2   would work fine if the A2 either hold 1 or 0   (you did not specify what value is in A2)

this one IF(B3="",""  this runs first if B3 is empty then will always return false if empty . because the return value is a null string empty and your rule 2 of =$A3=1  would return false.
0
 
LVL 32

Author Comment

by:Rob Henson
ID: 40433161
That's the bizarre thing, when I copy and paste values and formats into a copy file with a view to taking out the sensitive data, the CF works fine. I end up with alternating red and green because the red rule takes over because it can't find the task reference elsewhere but the green rule works ok, alternate lines are the same shade of green.

If you look at the screen shot I uploaded, the paler shade of green is the correct shade and is what I get for all alternate blocks on the copy file.

Thanks
Rob H
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 32

Author Comment

by:Rob Henson
ID: 40433199
Prof JJ - Rule 2 also gives TRUE or FALSE. The CF Formula is =$A3=1

The formula that you broke out is in cells in column A and that works fine, it alternates values 1 and 0 for alternating blocks based on the task reference in column D but allows for previous row being blank, shown on screen shot as left most column.

Philip - I tried with different colours and the same happened.

I tried removing Rule 2 and replacing but same result.

Thanks
Rob
0
 
LVL 68

Expert Comment

by:Qlemo
ID: 40433306
Are the green ones getting red if you remove the task reference?
Seeing the screenshot the paler green seems to be wrong - the CF shows a darker one.
0
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40434548
I think without the sample file (which only needs to contain columns A and D), we are a bit in the dark.
0
 
LVL 32

Accepted Solution

by:
Rob Henson earned 0 total points
ID: 40435087
Hi All,

Thanks for your inputs but unfortunately I was not able to upload a sample file. As soon as I replicated in a sample file it worked fine.

So I decided to remove all CF, remove all manual cell fill formats and re-apply the CF. It now works fine.

Thanks
Rob H
0
 
LVL 32

Author Closing Comment

by:Rob Henson
ID: 40445484
Solved by removing and replacing CF rules.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now