View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Matt_2K[_3_] Matt_2K[_3_] is offline
external usenet poster
 
Posts: 1
Default Macro VBA, Drop down IF statement


Thanks. I modified my code a bit using this:


Code
-------------------

Sub DropDown1_Change()
'
' DropDown1_Change Macro
' Macro recorded 02/11/2005 by 96bst01
If Range("C4").Value = "1" Then
Range("E4").Select
Selection.NumberFormat = "0%"
ElseIf Range("C4").Value = "2" Then
Range("E4").Select
Selection.NumberFormat = "£#,##0.00"
End If

End Sub

-------------------


Now, this code works fine for one row, but can I have this on multipl
rows?

E.g. having a drop down box which is linked to a cell reference, BUT
need the C4 and E4 to change depending on the row and cell link. Ho
can I achieve this in VBA

--
Matt_2
-----------------------------------------------------------------------
Matt_2K's Profile: http://www.excelforum.com/member.php...nfo&userid=617
View this thread: http://www.excelforum.com/showthread.php?threadid=48102