diff --git a/Export-Excel.ps1 b/Export-Excel.ps1 index d9ffc98..e616f49 100644 --- a/Export-Excel.ps1 +++ b/Export-Excel.ps1 @@ -347,7 +347,11 @@ function Export-Excel { $rule=($ws.Cells[$Range].ConditionalFormatting).$target() if($targetConditionalText.Text) { - $rule.Text = $targetConditionalText.Text + if($targetConditionalText.ConditionalType -eq "equal") { + $rule.Formula= $targetConditionalText.Text + } else { + $rule.Text = $targetConditionalText.Text + } } $rule.Style.Font.Color.Color = $targetConditionalText.ConditionalTextColor diff --git a/New-ConditionalText.ps1 b/New-ConditionalText.ps1 index 40629be..655140d 100644 --- a/New-ConditionalText.ps1 +++ b/New-ConditionalText.ps1 @@ -7,7 +7,7 @@ function New-ConditionalText { [String]$Range, [OfficeOpenXml.Style.ExcelFillStyle]$PatternType=[OfficeOpenXml.Style.ExcelFillStyle]::Solid, [ValidateSet( - "ContainsText","NotContainsText","BeginsWith","EndsWith", + "Equal","ContainsText","NotContainsText","BeginsWith","EndsWith", "Last7Days","LastMonth","LastWeek", "NextMonth","NextWeek", "ThisMonth","ThisWeek",