Using If-Then Function in VBA
Closed
kook
-
Jul 9, 2010 at 10:44 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jul 9, 2010 at 04:54 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jul 9, 2010 at 04:54 PM
Related:
- Using If-Then Function in VBA
- Vba case like - Guide
- Number to words in excel formula without vba - Guide
- Vba check if value is in array - Guide
- Find function on mac - Guide
- Agp function - Guide
1 response
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Jul 9, 2010 at 04:54 PM
Jul 9, 2010 at 04:54 PM
If there are many if -elseif....else..end if. then you are better off using Select Case .. Case ... End Select
like
like
lRow = 1 Select Case Range("C" & lRow) Case Is = 5 Range("e" & lRow) = "A" Case Is = 6 Range("E" & lRow) = "t" Case Is = 6 Range("E" & lRow) = 8 Case Else Range("E" & lRow) = "" End Select