Conditional Formatting does not recognize formula

%3CLINGO-SUB%20id%3D%22lingo-sub-3326660%22%20slang%3D%22en-US%22%3EConditional%20Formatting%20does%20not%20recognize%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3326660%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20trying%20to%20use%20a%20formula%20to%20conditionally%20format%20and%20I%20keep%20getting%20the%20error%20message%20%22There's%20a%20problem%20with%20this%20formula.%22%20I%20want%20to%20highlight%20projects%20in%20column%20A%20if%20they%20are%20less%20than%207%20days%20old.%20I%20created%20a%20formula%20(LAMDA)%20that%20correctly%20calculates%20the%20number%20of%20days%20on%20the%20project%20(column%20B)%20and%20I%20used%20the%20same%20formula%20%26lt%3B7%20to%20generate%20TRUE%2FFALSE%20results%20(column%20C).%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22pennywiser_0-1651768380158.png%22%20style%3D%22width%3A%20355px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F369526i3EF2C427669A43C0%2Fimage-dimensions%2F355x287%3Fv%3Dv2%22%20width%3D%22355%22%20height%3D%22287%22%20role%3D%22button%22%20title%3D%22pennywiser_0-1651768380158.png%22%20alt%3D%22pennywiser_0-1651768380158.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22pennywiser_1-1651768958485.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F369528iA7BAD9EDD38F4A49%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22pennywiser_1-1651768958485.png%22%20alt%3D%22pennywiser_1-1651768958485.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20can%20conditionally%20format%20columns%20B%20and%20C%20and%20I%20can%20conditionally%20format%20column%20A%20if%20I%20refer%20to%20either%20column%20B%20or%20C.%20I%20cannot%20use%20either%20the%20B%20column%20or%20C%20column%20formula%20in%20a%20conditional%20format%20directly%20on%20%24A31.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20verified%20the%20following%3A%3C%2FP%3E%3CP%3E*%20the%20Formula%20checker%20found%20no%20errors%20on%20the%20worksheet%3B%3C%2FP%3E%3CP%3E*%20my%20references%20are%20correct%20when%20I've%20pasted%20the%20formulas%20into%20Conditional%20Formatting%20formula%20bar%20(%24A31%20is%20the%20active%20cell%20and%20the%20formula%20is%20the%20same%20as%20the%20formula%20on%20the%20worksheet)%3B%3C%2FP%3E%3CP%3E*%20Abiola%20David%20noted%20an%20apparent%20bug%20in%20using%20LAMDA%20calculations%20in%20conditional%20formatting%20in%20his%20YouTube%20channel%20but%20this%20doesn't%20seem%20to%20be%20related%20to%20my%20issue.%20I've%20created%20an%20XLOOKUP%20formula%20that%20gets%20the%20same%20results%20and%20get%20the%20same%20error%20message.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3326660%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3327590%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%20does%20not%20recognize%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3327590%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1382172%22%20target%3D%22_blank%22%3E%40pennywiser%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhich%20exactly%20formula%20do%20you%20try%20to%20use%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3329194%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%20does%20not%20recognize%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3329194%22%20slang%3D%22en-US%22%3EPer%20the%20screenshot%20in%20my%20previous%20post%3A%3CBR%20%2F%3EColumn%20A%20is%20text.%3CBR%20%2F%3EColumn%20B%20formula%20%3DAuditFormat(%24A31%2COversight%5BDate%20Assigned%5D)%2C%20where%3CBR%20%2F%3EAuditFormat%20is%20a%20named%20formula%20as%20follows%3A%3CBR%20%2F%3ELAMDA(auditID%2CPhaseDate%2CDAYS(TODAY()%2CXLOOKUP(auditID%2COversight%5BAudit%20No.%5D%2CPhaseDate)))%3CBR%20%2F%3EColumn%20C%20formula%20%3DAuditFormat(%24A31%2COversight%5BDate%20Assigned%5D)%26lt%3B7%3CBR%20%2F%3E%3CBR%20%2F%3EBoth%20column%20B%20and%20C%20are%20referencing%20the%20same%20project%20IDs%20and%20the%20parameter%20PhaseDate%20is%20the%20%22Date%20Assigned%22%20range%20on%20table%20%22Oversight%22.%20They%20are%20working%20correctly.%3CBR%20%2F%3E%3CBR%20%2F%3EOf%20course%2C%20the%20conditional%20formatting%20needs%20to%20evaluate%20to%20TRUE%20or%20FALSE%2C%20so%20the%20equation%20in%20the%20conditional%20formatting%20editor%20also%20sets%20up%20TRUE%20if%20%26lt%3B7.%20To%20do%20this%2C%20I%20highlighted%20the%20Project%20IDs%20and%20in%20%24A31%20I%20navigated%20Conditional%20Formatting%20-%26gt%3B%20New%20Rule%20-%26gt%3B%20Use%20a%20formula%20to%20determine%20which%20cells%20to%20format%3CBR%20%2F%3E%3CBR%20%2F%3Ewhere%20I%20inputted%20the%20formula%20%3DAuditFormat(%24A31%2COversight%5BDate%20Assigned%5D)%26lt%3B7%3CBR%20%2F%3E%3CBR%20%2F%3EI%20tried%20cutting%20and%20pasting%20the%20formula%20or%20hand%20writing%20the%20formula.%20Excel%20consistently%20rejects%20my%20entry%20as%20a%20formula%2C%20however%2C%20the%20conditional%20formatting%20works%20fine%20to%20*reference*%20the%20results%20in%20either%20column%20B%20or%20column%20C%20to%20apply%20formatting%20to%20column%20A.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3333717%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%20does%20not%20recognize%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3333717%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1382172%22%20target%3D%22_blank%22%3E%40pennywiser%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20can't%20use%20structured%20reference%20and%20arrays%20in%20conditional%20formatting.%20Try%20%3D%24C31%20instead%20or%20use%20direct%20references.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I'm trying to use a formula to conditionally format and I keep getting the error message "There's a problem with this formula." I want to highlight projects in column A if they are less than 7 days old. I created a formula (LAMDA) that correctly calculates the number of days on the project (column B) and I used the same formula <7 to generate TRUE/FALSE results (column C).

pennywiser_0-1651768380158.png

pennywiser_1-1651768958485.png

 

I can conditionally format columns B and C and I can conditionally format column A if I refer to either column B or C. I cannot use either the B column or C column formula in a conditional format directly on $A31. 

 

I've verified the following:

* the Formula checker found no errors on the worksheet;

* my references are correct when I've pasted the formulas into Conditional Formatting formula bar ($A31 is the active cell and the formula is the same as the formula on the worksheet);

* Abiola David noted an apparent bug in using LAMDA calculations in conditional formatting in his YouTube channel but this doesn't seem to be related to my issue. I've created an XLOOKUP formula that gets the same results and get the same error message.

3 Replies

@pennywiser 

Which exactly formula do you try to use?

Per the screenshot in my previous post:
Column A is text.
Column B formula =AuditFormat($A31,Oversight[Date Assigned]), where
AuditFormat is a named formula as follows:
LAMDA(auditID,PhaseDate,DAYS(TODAY(),XLOOKUP(auditID,Oversight[Audit No.],PhaseDate)))
Column C formula =AuditFormat($A31,Oversight[Date Assigned])<7

Both column B and C are referencing the same project IDs and the parameter PhaseDate is the "Date Assigned" range on table "Oversight". They are working correctly.

Of course, the conditional formatting needs to evaluate to TRUE or FALSE, so the equation in the conditional formatting editor also sets up TRUE if <7. To do this, I highlighted the Project IDs and in $A31 I navigated Conditional Formatting -> New Rule -> Use a formula to determine which cells to format

where I inputted the formula =AuditFormat($A31,Oversight[Date Assigned])<7

I tried cutting and pasting the formula or hand writing the formula. Excel consistently rejects my entry as a formula, however, the conditional formatting works fine to *reference* the results in either column B or column C to apply formatting to column A.

@pennywiser 

We can't use structured reference and arrays in conditional formatting. Try =$C31 instead or use direct references.