Solved

Multiple Conditional Format formula1 inconsistencies

Posted on 2011-03-16
4
413 Views
Last Modified: 2012-05-11
Hello all,
Please can someone assist or shed some light on this issue?

If a cell has multiple CF's and the appliesto ranges overlap, the .formatconditions.formula1 returns the same formula for all CF's.  It's best explained if you do the following:

In a new workbook Sheet1 do the following:
A1 - Name as expenses_type
A1 enter "labour"  -- no " obviously
 cells E3 = "Type 1",- drag to J3 which should = "Type 6"
Cells E4:J4 = "money"  -- no " obviously

Select E6:J6 and add conditional format
=expenses_type="money"

then select E6 on it's own and add another Conditional Format
=e6="money"

No need to apply Format conditions and leave Stop if True unchecked.

Select E6

In VB editor:
Insert a standard module
Sub testcf()
Dim iCFCount As Integer, iCnt As Integer
Dim sCForms() As String
iCFCount = ActiveCell.FormatConditions.Count

ReDim sCForms(1 To iCFCount)

For iCnt = 1 To UBound(sCForms)
Debug.Print "CF Item " & iCnt & " is " & ActiveCell.FormatConditions.Item(iCnt).Formula1
Next iCnt

End Sub

Open in new window


In the immediate window you will see:

CF Item 1 is =expenses_type="money"
CF Item 2 is =expenses_type="money"

whereas in reality, CF Item 2 SHOULD = =e6="money"

Please help!  

Kind regards,
Robert
0
Comment
Question by:RODELS
  • 2
  • 2
4 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 35146701
Isn't this the same question you already asked here: http:/Q_26882099.html?

It appears to be a bug, and I can't see any way round it currently.

I wil check it out with the MVP group and file it as a bug if it hasn't already been reported.
0
 

Author Comment

by:RODELS
ID: 35146730
Hi yes it is the same question but there has been no definitive statement about this being a bug or not and no comments have been added since Sunday.  The last comment was a restatement of my question.

If it is a bug, it's been around for ages because it does this in 2007 (and I believe in 2003 where there was a workaround) ... That workaround no longer works so I was wondering if there is a workaround the workaround.

Many thanlks for looking at this.

Kind regards,
Robert
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 35146770
It does not behave the same for 2003 (at least for me), but it does in 2007 and 2010 (not that surprising since the CF changed in 2007)
As far as I can see the only way round it is to apply the first rule to E6 separately from F6:J6.
0
 

Author Closing Comment

by:RODELS
ID: 35292003
No comment
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

832 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