Related:
- Place found value to specific colm header
- How to find specific words on a page - Guide
- How do i find a specific video on youtube - Guide
- Front panel audio header - Guide
- How to delete specific chrome autofill suggestions - Guide
- How to appear offline in messenger for a specific person - Guide
2 responses
Ivan-hoe
Posts
433
Registration date
Saturday 16 February 2008
Status
Member
Last seen
17 October 2008
110
19 Sep 2008 à 07:44
19 Sep 2008 à 07:44
Hello Dan
Using Select Case instead of many If should make your code run faster.
Try this :
I.
Using Select Case instead of many If should make your code run faster.
Try this :
Dim MyRange As Range
Application.ScreenUpdating = False
With ActiveCell
Select Case MYF(FLD)
Case Is = "012007": Set MyRange = Range("J" & .Row & ":K" & .Row)
Case Is = "022007": Set MyRange = Range("L" & .Row)
Case Is = "032007": Set MyRange = Range("M" & .Row)
'...
Case Is = "022008": Set MyRange = Range("X" & .Row)
Case Else: Set MyRange = Nothing
End Select
End With
If Not MyRange Is Nothing Then MyRange.Value = "Y"
Application.ScreenUpdating = True
I.