Hi,
I'm trying to do some adjustments on this HTML code in order to paste it in Excel and give the values that have the title="Included a red color.
What I want to achieve:
-
First create a line break between " " AND "</td><td id=" (I assume that I need this to use the if /else condition where the variable lineText starts with <td id=. Because with the contain option it's not working.
-
Then I need to some regular expression to add the style element with colour red to the line.
I hope I've make myself clear
Current Macro:
Here is the html block:
<div><table id="matrix" cellpadding="0" cellspacing="0" onmouseup="picklistSetup.handleMouseUp(event)" onmousedown="picklistSetup.handleMouseDown(event)" style="width:99.8%"><tbody><tr><th class="topSelectHeader" width="8%"> Status: </th><th id="th_r0c0" class="selectHeader" onclick="picklistSetup.selectColumn(0)" width="16%"> Prospect </th><th id="th_r0c1" class="selectHeader" onclick="picklistSetup.selectColumn(1)" width="16%"> Onboarding </th><th id="th_r0c2" class="selectHeader" onclick="picklistSetup.selectColumn(2)" width="16%"> Client </th><th id="th_r0c3" class="selectHeader" onclick="picklistSetup.selectColumn(3)" width="16%"> Active </th><th id="th_r0c4" class="selectHeader" onclick="picklistSetup.selectColumn(4)" width="16%"> Inactive </th></tr><tr><th class="topSelectHeader" rowspan="10"> Reason Inactive: </th><td id="te_r0c0" class="hiddenPickValue" title="Excluded: Status: Prospect" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> 6 Months No Interaction </td><td id="te_r0c1" class="hiddenPickValue" title="Excluded: Status: Onboarding" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> 6 Months No Interaction </td><td id="te_r0c2" class="hiddenPickValue" title="Excluded: Status: Client" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> 6 Months No Interaction </td><td id="te_r0c3" class="hiddenPickValue" title="Excluded: Status: Active" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> 6 Months No Interaction </td><td id="te_r0c4" class="hiddenPickValue" title="Excluded: Status: Inactive" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> 6 Months No Interaction </td></tr><tr><td id="te_r1c0" class="hiddenPickValue" title="Excluded: Status: Prospect" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Bankrupt </td><td id="te_r1c1" class="hiddenPickValue" title="Excluded: Status: Onboarding" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Bankrupt </td><td id="te_r1c2" class="hiddenPickValue" title="Excluded: Status: Client" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Bankrupt </td><td id="te_r1c3" class="hiddenPickValue" title="Excluded: Status: Active" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Bankrupt </td><td id="te_r1c4" class="shownPickValue" title="Included: Status: Inactive" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Bankrupt </td></tr><tr><td id="te_r2c0" class="hiddenPickValue" title="Excluded: Status: Prospect" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Risk Unacceptable </td><td id="te_r2c1" class="hiddenPickValue" title="Excluded: Status: Onboarding" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Risk Unacceptable </td><td id="te_r2c2" class="hiddenPickValue" title="Excluded: Status: Client" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Risk Unacceptable </td><td id="te_r2c3" class="hiddenPickValue" title="Excluded: Status: Active" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Risk Unacceptable </td><td id="te_r2c4" class="hiddenPickValue" title="Excluded: Status: Inactive" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Risk Unacceptable </td></tr><tr><td id="te_r3c0" class="hiddenPickValue" title="Excluded: Status: Prospect" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Departed to Competitor </td><td id="te_r3c1" class="hiddenPickValue" title="Excluded: Status: Onboarding" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Departed to Competitor </td><td id="te_r3c2" class="hiddenPickValue" title="Excluded: Status: Client" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Departed to Competitor </td><td id="te_r3c3" class="hiddenPickValue" title="Excluded: Status: Active" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Departed to Competitor </td><td id="te_r3c4" class="shownPickValue" title="Included: Status: Inactive" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Departed to Competitor </td></tr><tr><td id="te_r4c0" class="hiddenPickValue" title="Excluded: Status: Prospect" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Merger </td><td id="te_r4c1" class="hiddenPickValue" title="Excluded: Status: Onboarding" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Merger </td><td id="te_r4c2" class="hiddenPickValue" title="Excluded: Status: Client" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Merger </td><td id="te_r4c3" class="hiddenPickValue" title="Excluded: Status: Active" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Merger </td><td id="te_r4c4" class="shownPickValue" title="Included: Status: Inactive" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Merger </td></tr><tr><td id="te_r5c0" class="hiddenPickValue" title="Excluded: Status: Prospect" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> No Products and Services </td><td id="te_r5c1" class="hiddenPickValue" title="Excluded: Status: Onboarding" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> No Products and Services </td><td id="te_r5c2" class="hiddenPickValue" title="Excluded: Status: Client" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> No Products and Services </td><td id="te_r5c3" class="hiddenPickValue" title="Excluded: Status: Active" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> No Products and Services </td><td id="te_r5c4" class="shownPickValue" title="Included: Status: Inactive" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> No Products and Services </td></tr><tr><td id="te_r6c0" class="hiddenPickValue" title="Excluded: Status: Prospect" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> No Statutory Market Account </td><td id="te_r6c1" class="hiddenPickValue" title="Excluded: Status: Onboarding" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> No Statutory Market Account </td><td id="te_r6c2" class="hiddenPickValue" title="Excluded: Status: Client" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> No Statutory Market Account </td><td id="te_r6c3" class="hiddenPickValue" title="Excluded: Status: Active" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> No Statutory Market Account </td><td id="te_r6c4" class="hiddenPickValue" title="Excluded: Status: Inactive" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> No Statutory Market Account </td></tr><tr><td id="te_r7c0" class="hiddenPickValue" title="Excluded: Status: Prospect" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Other </td><td id="te_r7c1" class="hiddenPickValue" title="Excluded: Status: Onboarding" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Other </td><td id="te_r7c2" class="hiddenPickValue" title="Excluded: Status: Client" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Other </td><td id="te_r7c3" class="hiddenPickValue" title="Excluded: Status: Active" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Other </td><td id="te_r7c4" class="shownPickValue" title="Included: Status: Inactive" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Other </td></tr><tr><td id="te_r8c0" class="hiddenPickValue" title="Excluded: Status: Prospect" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Project Cancelled </td><td id="te_r8c1" class="hiddenPickValue" title="Excluded: Status: Onboarding" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Project Cancelled </td><td id="te_r8c2" class="hiddenPickValue" title="Excluded: Status: Client" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Project Cancelled </td><td id="te_r8c3" class="hiddenPickValue" title="Excluded: Status: Active" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Project Cancelled </td><td id="te_r8c4" class="hiddenPickValue" title="Excluded: Status: Inactive" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Project Cancelled </td></tr><tr><td id="te_r9c0" class="hiddenPickValue" title="Excluded: Status: Prospect" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Proposal Declined (Credit Commission) </td><td id="te_r9c1" class="hiddenPickValue" title="Excluded: Status: Onboarding" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Proposal Declined (Credit Commission) </td><td id="te_r9c2" class="hiddenPickValue" title="Excluded: Status: Client" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Proposal Declined (Credit Commission) </td><td id="te_r9c3" class="hiddenPickValue" title="Excluded: Status: Active" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Proposal Declined (Credit Commission) </td><td id="te_r9c4" class="hiddenPickValue" title="Excluded: Status: Inactive" onmousedown="picklistSetup.handleClick(event,this)" ondblclick="picklistSetup.handleDblClick(event,this)" onmousemove="picklistSetup.handleMouseMove(event,this)"> Proposal Declined (Credit Commission) </td></tr></tbody></table></div>