Forum Discussion

DGMalcolm's avatar
DGMalcolm
Iron Contributor
Feb 12, 2022
Solved

Format row if formula returns a result

I have a workbook with 2 sheets that list devices purchased from 2 different companies - RESTCO and Conduit. There are 500 rows on the RESTCO sheet which won't change since I'm now doing business exclusively with Conduit. The Conduit sheet is growing as I am managing all purchases through them. When I enter new data on the Conduit sheet, I have a column with a formula (shown at the bottom of this post) that checks the RESTCO sheet to see if that same product exists on the RESTCO sheet. If it does, it pulls the # from the Order # column and puts it into a Reference column on the Conduit sheet. This lets me see if the product has been purchased before and find the details more easily. I've been adding additional columns to the Conduit sheet so the Reference column is now off screen. I figured I would add conditional formatting so that a row will be formatted in bold to make it more obvious without scrolling to the reference column. But I can't figure out how to configure the condition so it only bolds if the formula returns a result.

 

=IFERROR(INDEX('RESTCO'!$A$2:$A$501,MATCH(B2,'RESTCO'!$B$2:$B$501,0),1),"")

 

Any idea how to make this work?

 

TIA

~DGM~

  • DGMalcolm 

    =NOT(ISNA(INDEX(RESTCO!$A$2:$A$501,MATCH($B2,RESTCO!$B$2:$B$501,0),1)))

    An alternative could be this rule for conditional formatting. 

10 Replies

  • DGMalcolm 

    =NOT(ISNA(INDEX(RESTCO!$A$2:$A$501,MATCH($B2,RESTCO!$B$2:$B$501,0),1)))

    An alternative could be this rule for conditional formatting. 

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    DGMalcolm 

    Let assume you range is A2:E10000 and formula returns values in column E. Select entire range, add conditional formatting rule with formula =LEN($E2) > 0 and apply Bold format.

    • DGMalcolm's avatar
      DGMalcolm
      Iron Contributor
      The reference column on the Conduit sheet is R so I opened the Conditional Formatting rule and made the formula: ="LEN($R2)>0". The first row shows '101' which is the correct row from the RESTCO sheet. After applying the rule, nothing gets bolded. What else am I missing?

Resources