Forum Discussion

bshfrd's avatar
bshfrd
Copper Contributor
Feb 27, 2020
Solved

Conditional Highlighting for numbers within a text

I've an excel contact sheet with thousands of images that contains a column with dimensions. The sheet is produced automatically by a plugin in Lightroom, and outputs dimensions for each image as "000 x 000", so "1000 x 763" for example.

I need for the sheet to highlight in red if either of these figures go below the minimum pixels of 1200. I know that I can manually alter the spreadsheet to put these figures into separate cells, but as I will have to produce a number of these sheets I would like to have as little editing as possible.

I'm just getting to grips with excel, so haven't been able to figure out yet exactly how to write a formula to examine both numbers either side of x and highlight the cell red if either of them are below 1200. Can any whiz help me out?

 

  • It's pretty complicated, but try this custom rule (replacing B2 with the active cell):

     

    =OR(1*LEFT(B2,SEARCH("x",B2)-2)<1000,1*MID(B2,SEARCH("x",B2)+2,100)<1000)

2 Replies

  • Savia's avatar
    Savia
    Iron Contributor

    It's pretty complicated, but try this custom rule (replacing B2 with the active cell):

     

    =OR(1*LEFT(B2,SEARCH("x",B2)-2)<1000,1*MID(B2,SEARCH("x",B2)+2,100)<1000)

Resources