Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello I have the following code which I want to perform the cases I have written (also I want to add another 5 or 6 similar cases to the list). It seems that the cope runs and selects the range but does not fire the condtion ie Market Convention is AUDJPY-within range Could I please have some direction on what the problem seems to be (and text is correct on the first case if I change to value it gives a runtime error) Sub TEST() Dim rng1 As Range Dim LASTROW As Integer LASTROW = Range("A1").End(xlDown).Row Set rng1 = Range("H1:h" & LASTROW) Sheets("FXT Deals").Range("A1:AM" & LASTROW).Select Select Case rng1.TEXT Case "JPYAUD" Range("AC1:AC" & LASTROW).Value = "Convention is AUDJPY-within range" Case "JPYEUR" Range("AC1:AC" & LASTROW).Value = "Convention is EURJPY-within range" Case Else Range("h1:h100").Value = " " End Select End Sub -- Jimmylaki ------------------------------------------------------------------------ Jimmylaki's Profile: http://www.thecodecage.com/forumz/member.php?userid=768 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=133704 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Conditional Statements | Excel Programming | |||
Conditional Statements Help! | Excel Discussion (Misc queries) | |||
Conditional statements | Excel Worksheet Functions | |||
Conditional statements | Excel Programming | |||
Conditional statements | Excel Programming |