XL2BB error when range has conditional formatting

jmacleary

Well-known Member
Joined
Oct 5, 2015
Messages
1,060
Office Version
  1. 365
  2. 2007
Platform
  1. 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):

Book1
ABC
212/12/2019112/01/2020
313/02/2019613/08/2019
Sheet1
Cell Formulas
RangeFormula
C2:C3C2=EDATE(A2,B2)
 
@jmacleary - Thanks for reporting the error.

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

Thanks again.
 
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.
 
Oh, and I'm using excel 2007 if that makes a difference.
 
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.
 
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

Book1
ABC
1
212/12/201911/12/2020
32/13/201968/13/2019
Sheet3
Cell Formulas
RangeFormula
C2:C3C2=EDATE(A2,B2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C2:C3Expression=C2<>""textNO
 
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.
 
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,224,875
Messages
6,181,514
Members
453,050
Latest member
Obil

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top