raphagcwill
New Member
- Joined
- Jan 12, 2016
- Messages
- 41
Hi again,
I have two macros that are based on Condition formating.
They both search for specific text in column N, but dispalys diferents results.
WHen I run the macro, the entirerow where my text "ppo" is turns green. If i have 5 other matchaes , then they are all formatted togheter.
I would like the macro to find the first row wit the text "ppo" and then ask me if I want to apply makro 1 or 2.
The I would like to be asked for all the other matches.
Thanks in advance,
Raphael
Sub NO()
'
' NO Macro
'
'
Application.ScreenUpdating = False
Range("A:N").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$N1=""PPO"""
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
End With
With Selection.FormatConditions(1).Font
.Bold = True
.Italic = False
.Strikethrough = True
.Color = -16776961
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
Application.ScreenUpdating = True
Range("A2").Select
End Sub
Sub YES()
'
' YES Macro
'
'
Application.ScreenUpdating = False
Range("A:N").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$N1=""PPO"""
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 5296274
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
Application.ScreenUpdating = True
Range("A2").Select
End Sub
I have two macros that are based on Condition formating.
They both search for specific text in column N, but dispalys diferents results.
WHen I run the macro, the entirerow where my text "ppo" is turns green. If i have 5 other matchaes , then they are all formatted togheter.
I would like the macro to find the first row wit the text "ppo" and then ask me if I want to apply makro 1 or 2.
The I would like to be asked for all the other matches.
Thanks in advance,
Raphael
Sub NO()
'
' NO Macro
'
'
Application.ScreenUpdating = False
Range("A:N").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$N1=""PPO"""
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
End With
With Selection.FormatConditions(1).Font
.Bold = True
.Italic = False
.Strikethrough = True
.Color = -16776961
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
Application.ScreenUpdating = True
Range("A2").Select
End Sub
Sub YES()
'
' YES Macro
'
'
Application.ScreenUpdating = False
Range("A:N").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$N1=""PPO"""
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 5296274
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
Application.ScreenUpdating = True
Range("A2").Select
End Sub