Conditional Format for N value in fence report

Hello,

I am trying to conditionally format a text vs depth entity used to display the calculated N value on my fence reports. I would like the N value to be bolded and underlined when the sample type is an MC and report as regular text when the sample type is anything else. The sample type is inputed in <<Sample.Type>>. I have tried using an IIF but have not had any success.

This is the code for the calculated N value used in my fence report:

<<Let(Refusal Pen = <<User System Data.Refusal Penetration>>)>>_
<<HasData(<<SAMPLE.RQD Length>>,_
  <<ListBuildSepTrim(_
  <<cr>>,_
  <<Format(_
    <<Calc(100 * <<SAMPLE.Recovery Length>> / <<SAMPLE.Length>>)>>,_
    0_
  )>>,_
  <<DelimitData(_
    "(",_
    <<Format(_
      <<Calc(100 * <<SAMPLE.RQD Length>> / <<SAMPLE.Length>>)>>,_
      0_
    )>>,_
    ")"_
  )>>_
)>>,_
  <<HasData(<<SAMPLE.Blows 3rd>>,_
    <<Calc(<<SAMPLE.Blows 2nd>> + <<SAMPLE.Blows 3rd>>)>>,_
    <<FirstData(<<SAMPLE.Blows 2nd>>,<<SAMPLE.Blows 1st>>)>>_
  )>>_
  <<HasData(<<Get(Refusal Pen)>>,_
      )>>_
)>>