![]() |
Select Case with Text
I am using
Select.Case.Offset(0,2) Case 70 and it works great. Now I have to select text in the same row so I have Case BE It is not picking it up but it is not giving me an error. Is it because it is not numeric? I have tried "BE" and Case is BE nothing seems to work. Any suggestions would be greatly appreciated! Thanks! Marie |
Select Case with Text
Doesn't seem to work with the last case BE
For Each rCell In Range("List") With rCell If .Offset(0, 22).Text Like "F[OR]" Then If .Offset(0, 5).Value 0 And .Offset(0, 5) < 150 Then Select Case .Offset(0, 7) Case 70 FO70150Del60 = FO70150Del60 - (.Offset(0, 18).Value = 1) Case 71 FO71150Del60 = FO71150Del60 - (.Offset(0, 18).Value = 1) Case 71 FO71150Del60 = FO71150Del60 - (.Offset(0, 18).Value = 1) Case 72 FO72150Del60 = FO72150Del60 - (.Offset(0, 18).Value = 1) Case 73 FO73150Del60 = FO73150Del60 - (.Offset(0, 18).Value = 1) Case 74 FO74150Del60 = FO74150Del60 - (.Offset(0, 18).Value = 1) Case 75 FO75150Del60 = FO75150Del60 - (.Offset(0, 18).Value = 1) Case 76 FO76150Del60 = FO76150Del60 - (.Offset(0, 18).Value = 1) Case 77 FO77150Del60 = FO77150Del60 - (.Offset(0, 18).Value = 1) Case 78 FO78150Del60 = FO78150Del60 - (.Offset(0, 18).Value = 1) Case 79 FO79150Del60 = FO79150Del60 - (.Offset(0, 18).Value = 1) Case 80 FO80150Del60 = FO80150Del60 - (.Offset(0, 18).Value = 1) Case 81 FO81150Del60 = FO81150Del60 - (.Offset(0, 18).Value = 1) Case 82 FO82150Del60 = FO82150Del60 - (.Offset(0, 18).Value = 1) Case 83 FO83150Del60 = FO83150Del60 - (.Offset(0, 18).Value = 1) Case 84 FO84150Del60 = FO84150Del60 - (.Offset(0, 18).Value = 1) Case 87 FO87150Del60 = FO87150Del60 - (.Offset(0, 18).Value = 1) Case 88 FO88150Del60 = FO88150Del60 - (.Offset(0, 18).Value = 1) Case 89 FO89150Del60 = FO89150Del60 - (.Offset(0, 18).Value = 1) Case Is = "BE" FO71150Del60 = FO71150Del60 - (.Offset(0, 18).Value = 1) End Select End If End If End With "Don Guillett" wrote: post your code -- Don Guillett SalesAid Software "Marie" wrote in message ... I am using Select.Case.Offset(0,2) Case 70 and it works great. Now I have to select text in the same row so I have Case BE It is not picking it up but it is not giving me an error. Is it because it is not numeric? I have tried "BE" and Case is BE nothing seems to work. Any suggestions would be greatly appreciated! Thanks! Marie |
Select Case with Text
Stupid mistake, The last line refers to FO71 instead of FOBE. Thanks for the
help and sorry for wasting your time! When I changed it the problem was solved. Marie "Marie" wrote: Doesn't seem to work with the last case BE For Each rCell In Range("List") With rCell If .Offset(0, 22).Text Like "F[OR]" Then If .Offset(0, 5).Value 0 And .Offset(0, 5) < 150 Then Select Case .Offset(0, 7) Case 70 FO70150Del60 = FO70150Del60 - (.Offset(0, 18).Value = 1) Case 71 FO71150Del60 = FO71150Del60 - (.Offset(0, 18).Value = 1) Case 71 FO71150Del60 = FO71150Del60 - (.Offset(0, 18).Value = 1) Case 72 FO72150Del60 = FO72150Del60 - (.Offset(0, 18).Value = 1) Case 73 FO73150Del60 = FO73150Del60 - (.Offset(0, 18).Value = 1) Case 74 FO74150Del60 = FO74150Del60 - (.Offset(0, 18).Value = 1) Case 75 FO75150Del60 = FO75150Del60 - (.Offset(0, 18).Value = 1) Case 76 FO76150Del60 = FO76150Del60 - (.Offset(0, 18).Value = 1) Case 77 FO77150Del60 = FO77150Del60 - (.Offset(0, 18).Value = 1) Case 78 FO78150Del60 = FO78150Del60 - (.Offset(0, 18).Value = 1) Case 79 FO79150Del60 = FO79150Del60 - (.Offset(0, 18).Value = 1) Case 80 FO80150Del60 = FO80150Del60 - (.Offset(0, 18).Value = 1) Case 81 FO81150Del60 = FO81150Del60 - (.Offset(0, 18).Value = 1) Case 82 FO82150Del60 = FO82150Del60 - (.Offset(0, 18).Value = 1) Case 83 FO83150Del60 = FO83150Del60 - (.Offset(0, 18).Value = 1) Case 84 FO84150Del60 = FO84150Del60 - (.Offset(0, 18).Value = 1) Case 87 FO87150Del60 = FO87150Del60 - (.Offset(0, 18).Value = 1) Case 88 FO88150Del60 = FO88150Del60 - (.Offset(0, 18).Value = 1) Case 89 FO89150Del60 = FO89150Del60 - (.Offset(0, 18).Value = 1) Case Is = "BE" FO71150Del60 = FO71150Del60 - (.Offset(0, 18).Value = 1) End Select End If End If End With "Don Guillett" wrote: post your code -- Don Guillett SalesAid Software "Marie" wrote in message ... I am using Select.Case.Offset(0,2) Case 70 and it works great. Now I have to select text in the same row so I have Case BE It is not picking it up but it is not giving me an error. Is it because it is not numeric? I have tried "BE" and Case is BE nothing seems to work. Any suggestions would be greatly appreciated! Thanks! Marie |
All times are GMT +1. The time now is 11:32 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com