Advanced Conditional Format in 1 Click - Excel Macro for Beginner

Опубликовано: 22 Октябрь 2017
на канале: Caripros HR Analytics
4,370
23

Want to learn how to design a salary structure? Check: https://www.caripros.com/design-salar...
FREE template for my video: Excel for HR - Create Annual Employee Salary Increase Template from Scratch. You can download and try it out yourself here: https://bit.ly/2MLLdb7
FREE actual workbook for my video "Split a Master Spreadsheet into Multiple Sheets with 1 click - VBA for Beginner". You can download and try it out yourself here: https://bit.ly/2UmeX2v
New course Launched! I created it to show you step-by-step how to design a salary structure with regression analysis in Excel. Check out the detail here:
https://caripros-hr-analytics.teachab... Topic: Excel Macro - How to accomplish advanced conditional formatting in 1 click

Scenario: You want to conditional format based on relative value, not absolute value in 1 click

Function: Macro

**Macro Codes**
IMPORTANT NOTICE: Angle brackets aren't allowed in description. Alternative replacement is noted in the comment.

Sub ConditionalFormat1()
Dim i As Integer
ActiveSheet.Activate

For i = 10 To 20
If Range("G" & i) = Range("F" & i) Then
Range("G" & i + 1).Select
'1st Criteria of Red text color
Else: Range("G" & i).Font.Color = vbRed
End If
Next

End Sub
____________________________________________________
Sub ConditionalFormat2()
Dim i As Integer
ActiveSheet.Activate

For i = 10 To 20
If Range("G" & i) LESS THAN= Range("F" & i) Then
Range("G" & i + 1).Select
'2nd Criteria of Yellow fill color
Else: Range("G" & i).Interior.Color = vbYellow
End If
Next

End Sub
____________________________________________________
Sub ConditionalFormat3()
Dim i As Integer
ActiveSheet.Activate

For i = 10 To 20
If Range("F" & i) NOT EQUAL TO 0 Then
Range("G" & i + 1).Select
ElseIf Range("F" & i) = 0 And Range("G" & i) = 0 Then
Range("G" & i + 1).Select
'3rd Criteria of Black border color
Else:
'when Fi = 0 and Gi NOT EQUAL TO 0
Range("G" & i).BorderAround Color:=vbBlack, Weight:=xlThick
End If
Next

End Sub
____________________________________________________
Sub ConditionalFormat()
Dim i As Integer
ActiveSheet.Activate

For i = 10 To 20
If Range("G" & i) = Range("F" & i) Then
Range("G" & i + 1).Select
'1st Criteria of Red text color
Else: Range("G" & i).Font.Color = vbRed
End If
Next

For i = 10 To 20
If Range("G" & i) LESS THAN= Range("F" & i) Then
Range("G" & i + 1).Select
'2nd Criteria of Yellow fill color
Else: Range("G" & i).Interior.Color = vbYellow
End If
Next

For i = 10 To 20
If Range("F" & i) NOT EQUAL TO 0 Then
Range("G" & i + 1).Select
ElseIf Range("F" & i) = 0 And Range("G" & i) = 0 Then
Range("G" & i + 1).Select
'3rd Criteria of Black border color
Else: 'when Fi = 0 and Gi NOT EQUAL TO 0
Range("G" & i).BorderAround Color:=vbBlack, Weight:=xlThick
End If
Next
End Sub
____________________________________________________






For more successful stories, view at: http://caripros.com/index.php/success...

*****Follow-up Consulting Services*****
If you have specific question regarding your issue, you can email me at the email here https://goo.gl/WejijZ Note that there will be a fee of US$200 charged for solving your issue. The turnaround is within 24 hours. Any follow-up issue in 3 days will also be answered with no charge. Payment link: https://www.paypal.me/caripros

*****More Videos in Playlists*****
Power BI for Beginners: https://bit.ly/3ivKitD
Power BI for Advanced Users: http://bit.ly/3lE9zmO
Excel for HR https://goo.gl/JdeVnd
Excel for HR - Master Class https://goo.gl/LYfq2f
Excel Macro - Beginner https://goo.gl/Yae5nc
Excel Macro/VBA - Splitting a Master File https://goo.gl/m8CHya
Excel Macro/VBA - Auto-hide Rows or Columns http://bit.ly/2Mzteb5
Excel Charts Data Visualization https://goo.gl/2ao6BP
Excel Vlookup Function https://goo.gl/kP2Wpz
Excel Pivot Table Function https://goo.gl/rukkPs
Excel Array Function https://goo.gl/i4sQH8
Excel Index and Match Function https://goo.gl/i7VGU4
Excel Solver/Goal Seek Functions https://goo.gl/FTkTnj
Excel Cell Formatting Solutions https://goo.gl/gpa6MY
HR Analytics - Merit Matrix https://goo.gl/Koy7co
HR Analytics - Salary Structure https://goo.gl/uZBnFa
Excel Tricks https://goo.gl/TeqGDw
Excel Troubleshooting https://goo.gl/bdY5by
Fun HR Topics https://goo.gl/7zVg8h

For more successful stories, view at: http://caripros.com/index.php/success...

#ExcelforHR#HRAnalytics#Excel#HR


Смотрите видео Advanced Conditional Format in 1 Click - Excel Macro for Beginner онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Caripros HR Analytics 22 Октябрь 2017, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 4,370 раз и оно понравилось 23 людям.