I am trying to figure out if and how it would be possible to implement something like a conditional statement for the excel spreadsheet my program writes to. The spreadsheet is created on the fly each time the program opens up. I would like to place a statement along the lines of: If cell A from column A has text, but cell B from column B has no text, then cell B would be highlighted red. Here is an example of the spreadsheet formatting code I have done.
If EXCEL_LENGTH <> "" Then 'APPLY FORMATTING FOR FIRST ROW With objws.Range(EXCEL_LENGTH) .Font.Bold = True .Font.Size = 12.5 .Interior.ColorIndex = 15 .Interior.Pattern = Excel.XlPattern.xlPatternSolid .Font.Name = "Rockwell" .Font.Underline = True .Font.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Blue) End If