View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jimmylaki[_5_] Jimmylaki[_5_] is offline
external usenet poster
 
Posts: 1
Default Conditional Statements not firing


Hello,

I have made some further changes to the code which seems to work but
for each case in range H of JPYAUD I was expecting to see the comment
Market Convention is AUDJPY-within range" for each cell representing
JPYAUD however the whole column in AC range has the comment even if
there are other conditions in the range H. Any suggestions:

Sub test()
Dim c As Range

Dim LASTROW As Integer

LASTROW = Range("A1").End(xlDown).Row

Range("A1:AM" & LASTROW).Select
For Each c In Range("H1:H" & LASTROW)
Select Case c.Value

Case "JPYAUD"

Range("AC2:AC" & LASTROW).Value = "Market
Convention is AUDJPY-within range"
Exit For

Case Else


End Select

Next c

End Sub

Jimmylaki;487253 Wrote:
Hello,

Thank you for reply. I made the changes as you recommended but still
nothing was happening where I would have expected range AC to have the
conditional message this is my source code 'Select Case Statement in
Excel VBA Macro Code. Alternative to Multiple If, Or, And Else
Statements' (http://www.ozgrid.com/VBA/select-case.htm)



--
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