IF Statements Macro

boldcode

Active Member
Joined
Mar 12, 2010
Messages
347
<!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF/> <w:LidThemeOther>EN-US</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> <w:SplitPgBreakAndParaMark/> <w:EnableOpenTypeKerning/> <w:DontFlipMirrorIndents/> <w:OverrideTableStyleHps/> </w:Compatibility> <m:mathPr> <m:mathFont m:val="Cambria Math"/> <m:brkBin m:val="before"/> <m:brkBinSub m:val="--"/> <m:smallFrac m:val="off"/> <m:dispDef/> <m:lMargin m:val="0"/> <m:rMargin m:val="0"/> <m:defJc m:val="centerGroup"/> <m:wrapIndent m:val="1440"/> <m:intLim m:val="subSup"/> <m:naryLim m:val="undOvr"/> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true" DefSemiHidden="true" DefQFormat="false" DefPriority="99" LatentStyleCount="267"> <w:LsdException Locked="false" Priority="0" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Normal"/> <w:LsdException Locked="false" Priority="9" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/> <w:LsdException Locked="false" Priority="39" Name="toc 1"/> <w:LsdException Locked="false" Priority="39" Name="toc 2"/> <w:LsdException Locked="false" Priority="39" Name="toc 3"/> <w:LsdException Locked="false" Priority="39" Name="toc 4"/> <w:LsdException Locked="false" Priority="39" Name="toc 5"/> <w:LsdException Locked="false" Priority="39" Name="toc 6"/> <w:LsdException Locked="false" Priority="39" Name="toc 7"/> <w:LsdException Locked="false" Priority="39" Name="toc 8"/> <w:LsdException Locked="false" Priority="39" Name="toc 9"/> <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/> <w:LsdException Locked="false" Priority="10" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Title"/> <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/> <w:LsdException Locked="false" Priority="11" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/> <w:LsdException Locked="false" Priority="22" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Strong"/> <w:LsdException Locked="false" Priority="20" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/> <w:LsdException Locked="false" Priority="59" SemiHidden="false" UnhideWhenUsed="false" Name="Table Grid"/> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/> <w:LsdException Locked="false" Priority="1" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 1"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 1"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 1"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/> <w:LsdException Locked="false" Priority="34" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/> <w:LsdException Locked="false" Priority="29" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Quote"/> <w:LsdException Locked="false" Priority="30" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 1"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 1"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 2"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 2"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 2"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 2"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 2"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 3"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 3"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 3"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 3"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 3"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 4"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 4"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 4"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 4"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 4"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 5"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 5"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 5"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 5"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 5"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 6"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 6"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 6"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 6"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 6"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/> <w:LsdException Locked="false" Priority="19" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/> <w:LsdException Locked="false" Priority="21" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/> <w:LsdException Locked="false" Priority="31" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/> <w:LsdException Locked="false" Priority="32" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/> <w:LsdException Locked="false" Priority="33" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Book Title"/> <w:LsdException Locked="false" Priority="37" Name="Bibliography"/> <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/> </w:LatentStyles> </xml><![endif]--><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} </style> <![endif]--> Hello,

I want to create a Macro that Inserts the CORRECT VALUE into COLUMN “N” in the ACTIVE WORKSHEET based on the following certain requirements and a formula:


In the worksheet I have data contained in COLUMNS A through N. In the example below I deleted the data in COLUMNS B – J just to simplify things (the data in these columns does not matter for this Macro). Below is an example of what the data looks like before the Macro.


Data Before Macro:
<table style="width: 993px; height: 508px;" border="0" cellpadding="0" cellspacing="0"><col style="mso-width-source:userset;mso-width-alt:1865;width:38pt" width="51"> <col style="mso-width-source:userset;mso-width-alt:1426;width:29pt" width="39"> <col style="mso-width-source:userset;mso-width-alt:1389; width:29pt" span="2" width="38"> <col style="mso-width-source:userset;mso-width-alt:1426;width:29pt" width="39"> <col style="mso-width-source:userset;mso-width-alt:1353; width:28pt" span="2" width="37"> <col style="mso-width-source:userset;mso-width-alt:1426; width:29pt" span="2" width="39"> <col style="mso-width-source:userset;mso-width-alt:1243;width:26pt" width="34"> <col style="mso-width-source:userset;mso-width-alt:1280;width:26pt" width="35"> <col style="mso-width-source:userset;mso-width-alt:1389;width:29pt" width="38"> <col style="mso-width-source:userset;mso-width-alt:1572;width:32pt" width="43"> <col style="mso-width-source:userset;mso-width-alt:1536;width:32pt" width="42"> <col style="mso-width-source:userset;mso-width-alt:3072;width:63pt" width="84"> <tbody><tr style="height:15.0pt" height="20"> <td style="height:15.0pt;width:38pt" height="20" width="51">
</td> <td class="xl64" style="width:29pt" width="39">Col A</td> <td class="xl64" style="border-left:none;width:29pt" width="38">Col B</td> <td class="xl64" style="border-left:none;width:29pt" width="38">Col C</td> <td class="xl64" style="border-left:none;width:29pt" width="39">Col D</td> <td class="xl64" style="border-left:none;width:28pt" width="37">Col E</td> <td class="xl64" style="border-left:none;width:28pt" width="37">Col F</td> <td class="xl64" style="border-left:none;width:29pt" width="39">Col G</td> <td class="xl64" style="border-left:none;width:29pt" width="39">Col H</td> <td class="xl64" style="border-left:none;width:26pt" width="34">Col I</td> <td class="xl64" style="border-left:none;width:26pt" width="35">Col J</td> <td class="xl64" style="border-left:none;width:29pt" width="38">Col K</td> <td class="xl64" style="border-left:none;width:32pt" width="43">Col L</td> <td class="xl64" style="border-left:none;width:32pt" width="42">Col M</td> <td class="xl64" style="border-left:none;width:63pt" width="84">Col N</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt" height="20">Row 1</td> <td class="xl65" style="border-left:none">EID</td> <td class="xl65" style="border-left:none">HT</td> <td class="xl65" style="border-left:none">BT</td> <td class="xl65" style="border-left:none">JT</td> <td class="xl65" style="border-left:none">AT</td> <td class="xl65" style="border-left:none">PT</td> <td class="xl65" style="border-left:none">BR</td> <td class="xl65" style="border-left:none">NT</td> <td class="xl65" style="border-left:none">MU</td> <td class="xl65" style="border-left:none">MK</td> <td class="xl65" style="border-left:none">PID</td> <td class="xl65" style="border-left:none">Hours</td> <td class="xl65" style="border-left:none">SPE</td> <td class="xl66" style="border-left:none">PTION</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" height="20">Row 2</td> <td class="xl64" style="border-top:none;border-left:none">3</td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none">0</td> <td class="xl64" style="border-top:none;border-left:none">22</td> <td class="xl64" style="border-top:none;border-left:none">313.5</td> <td class="xl64" style="border-left:none"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" height="20">Row 3</td> <td class="xl64" style="border-top:none;border-left:none">3</td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none">1</td> <td class="xl64" style="border-top:none;border-left:none">319</td> <td class="xl64" style="border-top:none;border-left:none">1066</td> <td class="xl64" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" height="20">Row 4</td> <td class="xl64" style="border-top:none;border-left:none">3</td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none">0</td> <td class="xl64" style="border-top:none;border-left:none">289</td> <td class="xl64" style="border-top:none;border-left:none">313.5</td> <td class="xl64" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" height="20">Row 5</td> <td class="xl64" style="border-top:none;border-left:none">3</td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none">1</td> <td class="xl64" style="border-top:none;border-left:none">69.5</td> <td class="xl64" style="border-top:none;border-left:none">1066</td> <td class="xl64" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" height="20">Row 6</td> <td class="xl64" style="border-top:none;border-left:none">3</td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none">1</td> <td class="xl64" style="border-top:none;border-left:none">538.5</td> <td class="xl64" style="border-top:none;border-left:none">1066</td> <td class="xl64" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" height="20">Row 7</td> <td class="xl64" style="border-top:none;border-left:none">3</td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none">1</td> <td class="xl64" style="border-top:none;border-left:none">86.5</td> <td class="xl64" style="border-top:none;border-left:none">1066</td> <td class="xl64" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" height="20">Row 8</td> <td class="xl64" style="border-top:none;border-left:none">3</td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none">1</td> <td class="xl64" style="border-top:none;border-left:none">52.5</td> <td class="xl64" style="border-top:none;border-left:none">1066</td> <td class="xl64" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" height="20">Row 9</td> <td class="xl64" style="border-top:none;border-left:none">3</td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none">0</td> <td class="xl64" style="border-top:none;border-left:none">1.5</td> <td class="xl64" style="border-top:none;border-left:none">313.5</td> <td class="xl64" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" height="20">Row 10</td> <td class="xl64" style="border-top:none;border-left:none">3</td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none">0</td> <td class="xl64" style="border-top:none;border-left:none">1</td> <td class="xl64" style="border-top:none;border-left:none">313.5</td> <td class="xl64" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" height="20">Row 11</td> <td class="xl64" style="border-top:none;border-left:none">4</td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none">1</td> <td class="xl64" style="border-top:none;border-left:none">5</td> <td class="xl64" style="border-top:none;border-left:none">10</td> <td class="xl64" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" height="20">Row 12</td> <td class="xl64" style="border-top:none;border-left:none">4</td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none">1</td> <td class="xl64" style="border-top:none;border-left:none">5</td> <td class="xl64" style="border-top:none;border-left:none">10</td> <td class="xl64" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" height="20">Row 13</td> <td class="xl64" style="border-top:none;border-left:none">#</td> <td class="xl63" style="border-top:none;border-left:none"> </td> <td class="xl63" style="border-top:none;border-left:none"> </td> <td class="xl63" style="border-top:none;border-left:none"> </td> <td class="xl63" style="border-top:none;border-left:none"> </td> <td class="xl63" style="border-top:none;border-left:none"> </td> <td class="xl63" style="border-top:none;border-left:none"> </td> <td class="xl63" style="border-top:none;border-left:none"> </td> <td class="xl63" style="border-top:none;border-left:none"> </td> <td class="xl63" style="border-top:none;border-left:none"> </td> <td class="xl64" style="border-top:none;border-left:none">2</td> <td class="xl64" style="border-top:none;border-left:none">80</td> <td class="xl64" style="border-top:none;border-left:none">80</td> <td class="xl64" style="border-top:none;border-left:none"> </td> </tr> </tbody></table>

I want the Macro to do the following THREE THINGS:
1. IF the Value in COLUMN K is “0” THEN enter “n/a” into COLUMN “N”
2. IF the Value in COLUMN K is “2” THEN enter “anomaly” into COLUMN “N”
3. IF the Value in COLUMN K is “1” THEN for ALL ROWS that have the SAME VALUE in COLUMN A use a formula that looks similar to this example:
=L3+((L3/M3)*(The RESULT OF the SUM of HOURS in COLUMN L for all the ROWS that have the SAME VALUE in COLUMN A and have a ”0” in COLUMN K). The RESULT of the FORMULA would be entered into COLUMN “N”


Here is an example of how the formula will work:


I will use ROW 3 in the dataset I provide above under “Data Before Macro”. From the dataset I know CELL L3 equals 319 and CELL M3 equals 1066. Now I will SUM the HOURS in COLUMN L ROWS 2, 4, 9, and 10 for ALL ROWS that have the SAME VALUE in COLUMN A and contain a “0” in COLUMN K which happens to equal 313.5. So now I plug that into the formula: =319+((319/1066)*(313.5)) and MY RESULT which will go into COLUMN “N” IS : 412.81.



Below is an example of what the data should look like after the Macro executes.


Data After Macro:


<table style="width: 1019px; height: 510px;" border="0" cellpadding="0" cellspacing="0"><col style="mso-width-source:userset;mso-width-alt:1865;width:38pt" width="51"> <col style="mso-width-source:userset;mso-width-alt:1426;width:29pt" width="39"> <col style="mso-width-source:userset;mso-width-alt:1389; width:29pt" span="2" width="38"> <col style="mso-width-source:userset;mso-width-alt:1426;width:29pt" width="39"> <col style="mso-width-source:userset;mso-width-alt:1353; width:28pt" span="2" width="37"> <col style="mso-width-source:userset;mso-width-alt:1426; width:29pt" span="2" width="39"> <col style="mso-width-source:userset;mso-width-alt:1243;width:26pt" width="34"> <col style="mso-width-source:userset;mso-width-alt:1280;width:26pt" width="35"> <col style="mso-width-source:userset;mso-width-alt:1389;width:29pt" width="38"> <col style="mso-width-source:userset;mso-width-alt:1572;width:32pt" width="43"> <col style="mso-width-source:userset;mso-width-alt:1536;width:32pt" width="42"> <col style="mso-width-source:userset;mso-width-alt:3072;width:63pt" width="84"> <tbody><tr style="height:15.0pt" height="20"> <td style="height:15.0pt;width:38pt" height="20" width="51">
</td> <td class="xl66" style="width:29pt" width="39">Col A</td> <td class="xl66" style="border-left:none;width:29pt" width="38">Col B</td> <td class="xl66" style="border-left:none;width:29pt" width="38">Col C</td> <td class="xl66" style="border-left:none;width:29pt" width="39">Col D</td> <td class="xl66" style="border-left:none;width:28pt" width="37">Col E</td> <td class="xl66" style="border-left:none;width:28pt" width="37">Col F</td> <td class="xl66" style="border-left:none;width:29pt" width="39">Col G</td> <td class="xl66" style="border-left:none;width:29pt" width="39">Col H</td> <td class="xl66" style="border-left:none;width:26pt" width="34">Col I</td> <td class="xl66" style="border-left:none;width:26pt" width="35">Col J</td> <td class="xl66" style="border-left:none;width:29pt" width="38">Col K</td> <td class="xl66" style="border-left:none;width:32pt" width="43">Col L</td> <td class="xl66" style="border-left:none;width:32pt" width="42">Col M</td> <td class="xl66" style="border-left:none;width:63pt" width="84">Col N</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl65" style="height:15.0pt" height="20">Row 1</td> <td class="xl67" style="border-left:none">EID</td> <td class="xl67" style="border-left:none">HT</td> <td class="xl67" style="border-left:none">BT</td> <td class="xl67" style="border-left:none">JT</td> <td class="xl67" style="border-left:none">AT</td> <td class="xl67" style="border-left:none">PT</td> <td class="xl67" style="border-left:none">BR</td> <td class="xl67" style="border-left:none">NT</td> <td class="xl67" style="border-left:none">MU</td> <td class="xl67" style="border-left:none">MK</td> <td class="xl67" style="border-left:none">PID</td> <td class="xl67" style="border-left:none">Hours</td> <td class="xl67" style="border-left:none">SPE</td> <td class="xl68" style="border-left:none">PTION</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl65" style="height:15.0pt;border-top:none" height="20">Row 2</td> <td class="xl66" style="border-top:none;border-left:none">3</td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none">0</td> <td class="xl66" style="border-top:none;border-left:none">22</td> <td class="xl66" style="border-top:none;border-left:none">313.5</td> <td class="xl66" style="border-left:none">n/a</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl65" style="height:15.0pt;border-top:none" height="20">Row 3</td> <td class="xl66" style="border-top:none;border-left:none">3</td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none">1</td> <td class="xl66" style="border-top:none;border-left:none">319</td> <td class="xl66" style="border-top:none;border-left:none">1066</td> <td class="xl69" style="border-top:none;border-left:none">412.81</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl65" style="height:15.0pt;border-top:none" height="20">Row 4</td> <td class="xl66" style="border-top:none;border-left:none">3</td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none">0</td> <td class="xl66" style="border-top:none;border-left:none">289</td> <td class="xl66" style="border-top:none;border-left:none">313.5</td> <td class="xl66" style="border-top:none;border-left:none">n/a</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl65" style="height:15.0pt;border-top:none" height="20">Row 5</td> <td class="xl66" style="border-top:none;border-left:none">3</td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none">1</td> <td class="xl66" style="border-top:none;border-left:none">69.5</td> <td class="xl66" style="border-top:none;border-left:none">1066</td> <td class="xl69" style="border-top:none;border-left:none">89.94</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl65" style="height:15.0pt;border-top:none" height="20">Row 6</td> <td class="xl66" style="border-top:none;border-left:none">3</td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none">1</td> <td class="xl66" style="border-top:none;border-left:none">538.5</td> <td class="xl66" style="border-top:none;border-left:none">1066</td> <td class="xl69" style="border-top:none;border-left:none">696.87</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl65" style="height:15.0pt;border-top:none" height="20">Row 7</td> <td class="xl66" style="border-top:none;border-left:none">3</td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none">1</td> <td class="xl66" style="border-top:none;border-left:none">86.5</td> <td class="xl66" style="border-top:none;border-left:none">1066</td> <td class="xl69" style="border-top:none;border-left:none">111.94</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl65" style="height:15.0pt;border-top:none" height="20">Row 8</td> <td class="xl66" style="border-top:none;border-left:none">3</td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none">1</td> <td class="xl66" style="border-top:none;border-left:none">52.5</td> <td class="xl66" style="border-top:none;border-left:none">1066</td> <td class="xl69" style="border-top:none;border-left:none">67.94</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl65" style="height:15.0pt;border-top:none" height="20">Row 9</td> <td class="xl66" style="border-top:none;border-left:none">3</td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none">0</td> <td class="xl66" style="border-top:none;border-left:none">1.5</td> <td class="xl66" style="border-top:none;border-left:none">313.5</td> <td class="xl66" style="border-top:none;border-left:none">n/a</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl65" style="height:15.0pt;border-top:none" height="20">Row 10</td> <td class="xl66" style="border-top:none;border-left:none">3</td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none">0</td> <td class="xl66" style="border-top:none;border-left:none">1</td> <td class="xl66" style="border-top:none;border-left:none">313.5</td> <td class="xl66" style="border-top:none;border-left:none">n/a</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl65" style="height:15.0pt;border-top:none" height="20">Row 11</td> <td class="xl66" style="border-top:none;border-left:none">4</td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none">1</td> <td class="xl66" style="border-top:none;border-left:none">5</td> <td class="xl66" style="border-top:none;border-left:none">10</td> <td class="xl69" style="border-top:none;border-left:none">161.75</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl65" style="height:15.0pt;border-top:none" height="20">Row 12</td> <td class="xl66" style="border-top:none;border-left:none">4</td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none">1</td> <td class="xl66" style="border-top:none;border-left:none">5</td> <td class="xl66" style="border-top:none;border-left:none">10</td> <td class="xl69" style="border-top:none;border-left:none">161.75</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl65" style="height:15.0pt;border-top:none" height="20">Row 13</td> <td class="xl66" style="border-top:none;border-left:none">#</td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none"> </td> <td class="xl66" style="border-top:none;border-left:none">2</td> <td class="xl66" style="border-top:none;border-left:none">80</td> <td class="xl66" style="border-top:none;border-left:none">80</td> <td class="xl66" style="border-top:none;border-left:none">anomaly</td> </tr> </tbody></table>
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Any particular reason you need a macro, and couldn't use a formula with an IF function?
 
Upvote 0
iliace,

Thank you for your response first of all. This macro is actually going to be used as an Excel Add-in. If I use a formula I would then have to copy this formula into every workbook I use. The Excel Add-In is more flexible that way given that the dataset is set up the correct way.

- BC
 
Upvote 0
Do not Respond to this Post. I, boldcode, need to change help request.

Do not respond to this post as I had to make modifications in what I am asking for.

I apologize for the inconvenience.

BC
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,292
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top