How to set red colour to complete row text when column "Results" contains failed?

Yes, you can use that activity to meet your requirement.

1 Like

But not font colour.

@MitheshBolla Please check the below screenshot. Like this way you can do.

1 Like

@MitheshBolla
VBA Solution

  1. copy below code to text file e.g. vba.txt
Function highlightCellRed(columnLetter as string, rowNumber as integer, sheetName as string) 
    Activeworkbook.Sheets(sheetName).activate
    Range(columnLetter & cstr(rowNumber)).Select
    With Selection.Font
        .Color = vbRed
        '.TintAndShade = 0
    End With
    Activeworkbook.Save
End Function
  1. in excel application scope use invoke VBA activity to call the macro
    the entry method parameters are {column letter, row number, sheet Name}
    e.g. {"A",1,"Sheet1"}
1 Like

with this can i add font colour to whole row?

1 Like

yes but its troublesome, if you want to highlight whole row, do this instead

  1. add below code to vba.txt
Function highlightCellRedWholeRow(rowNumber As Integer, sheetName As String)
    ActiveWorkbook.Sheets(sheetName).Activate
    Rows(CStr(rowNumber) & ":" & CStr(rowNumber)).Select
    With Selection.Font
        .Color = vbRed
    End With
    ActiveWorkbook.Save
End Function
  1. use invoke VBA in excel application scope, set function name = highlightCellRedWholeRow,
    entryMethodParameters = {rowNumber, SheetName}
    e.g. {2, Sheet1} to highlight row 2 in sheet1
1 Like

image
how to write in c#

new object[]{rowCount,eachSheetName}

This had worked bro , thanks a lot.

In excel Based on condition i added font colour for complete row, solution provided by @jack.chan .
And also enable macros in excel.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.