XL2BB error when range has conditional formatting

jmacleary

Well-known Member
Joined
Oct 5, 2015
Messages
782
Office Version
2007
Platform
Windows
I was trying to use XL2BB to answer a thread on here and my selected range contained conditional formatting. When I used the tool I got an error (see pic 2). If I didn't check the conditional formatting box, it generated the data fine.

xl2bb1.PNG
xl2bb2.PNG


The generated data (without conditional formatting selected):

xl2bb.xlam
ABC
212/12/20191
313/02/20196
Sheet1
Cell Formulas
Range(s)Formula
C2:C3C2=EDATE(A2,B2)
 

smozgur

BatCoder
Joined
Feb 28, 2002
Messages
881
@jmacleary - Thanks for reporting the error.

Could you please let me know the conditional formatting rule in C3?

Thanks again.
 

jmacleary

Well-known Member
Joined
Oct 5, 2015
Messages
782
Office Version
2007
Platform
Windows
Hello. It is a rule applied to the whole column, as follows:
Code:
=AND($C1>0,$C1<TODAY())
and the format applied is a background fill of amber.
 

jmacleary

Well-known Member
Joined
Oct 5, 2015
Messages
782
Office Version
2007
Platform
Windows
Oh, and I'm using excel 2007 if that makes a difference.
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,327
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
Oh, and I'm using excel 2007 if that makes a difference.
It will if the code in XL2BB uses the DisplayFormat property as that didn't exist in 2007.
 

Scott T

Well-known Member
Joined
Dec 14, 2016
Messages
2,587
Office Version
365, 2016
Platform
Windows
It will if the code in XL2BB uses the DisplayFormat property as that didn't exist in 2007.
That does look like the problem as I used CF in 2016 and it works

xl2bb.xlam
ABC
1
212/12/20191
32/13/20196
Sheet3
Cell Formulas
Range(s)Formula
C2:C3C2=EDATE(A2,B2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C2:C3Expression=C2<>""textNO
 

smozgur

BatCoder
Joined
Feb 28, 2002
Messages
881
It will if the code in XL2BB uses the DisplayFormat property as that didn't exist in 2007.
Interesting, the add-in supposed to not fail since it is checking Excel version and simply ignoring the displayed format if the function is not supported. However, it looks to be failing somehow.

Added this into the list, and I'll be checking for the upcoming update.

Thanks again.
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,327
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
You could use conditional compilation #If VBA7 then, assuming this is actually the issue (though I’d expect a 438 error rather than 1004).
 

Forum statistics

Threads
1,081,849
Messages
5,361,679
Members
400,644
Latest member
ndroger1

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top