Related:
- Place found value to specific colm header
- How to find specific words on a page - Guide
- Front panel audio header - Guide
- How to block calls from specific country iphone - Guide
- Search specific youtube channel - Guide
- How to add watermark in word on specific pages - Guide
2 responses
Ivan-hoe
Posts
433
Registration date
Saturday February 16, 2008
Status
Member
Last seen
October 17, 2008
110
Sep 19, 2008 at 07:44 AM
Sep 19, 2008 at 07:44 AM
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.