Search code examples
sqlms-access

Conditional formatting excel to access (SQL)


I'm not that familiar with access/SQL and am trying to convert a conditional formatting expression that works in Excel over to access.

Here is the Excel function:

=AND(ISNUMBER(SEARCH("<",G249)),VALUE(SUBSTITUTE(G249,"<",""))>14)

If both of these are true, then the cell is formatted a certain way. Is there a way to convert this to SQL?

Thank you.


Solution

  • You do not do the conditional formatting in the sql statement. It is performed by going into the Format menu and selecting the Conditional Formatting item. Based on the function you've provided, I would do something similar to the example shown here: enter image description here

    Ensure you replace the [G249] portion with your field name.

    The only other thing that should be mentioned, is the text that may follow the number, such as that 'J'. in which case I would encase the number with the Val function, example:

    Val(Replace([G249],"<",""))
    

    I hope this helps.