LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Converting IF Formul To VBA


Hi everybody,

I have this IF Formula and I want to convert it to VBA code to get the
same purpose,



Code:
--------------------
IF((AND(S43,V40,U4="A3")),"A1",(IF((OR(W4<AM4,$A E$3<12,AA49)),"a1",IF((AND(S410,AA41)),"A1",IF( S43,"A2","")))))
--------------------


Actually, I tried this code but it didn't work properly with me I
don't know the error exactly.


Code:
--------------------
Private Sub Worksheet_Change(ByVal Target As Range)
If (Range("S" & Target.Row).Value 3 And Range("V" & Target.Row).Value 0 And Range("U" & Target.Row).Value = "A3") _
Or (Range("W" & Target.Row).Value < Range("AM" & Target.Row).Value Or Range("AE" & Target.Row).Value < 12 Or Range("AA" & Target.Row).Value 9) _
Or (Range("S" & Target.Row).Value 10 And Range("AA" & Target.Row).Value 1) Then
Range("B" & Target.Row).Value = "A1"
ElseIf Range("S" & Target.Row).Value 3 Then
Range("B" & Target.Row).Value = "A2"
Else: Range("B" & Target.Row).Value = ""
Exit Sub
End If
End Sub
--------------------


So, I would like you please to help me to get the formuls working in
range B3:B102 only.

Thanks for all.


--
LoveCandle
------------------------------------------------------------------------
LoveCandle's Profile: http://www.excelforum.com/member.php...o&userid=28612
View this thread: http://www.excelforum.com/showthread...hreadid=486751

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to not get '0' or '#DIV/0!' in a cell with a percentage formul Rum Excel Worksheet Functions 7 June 30th 09 06:06 PM
formul [email protected] Excel Discussion (Misc queries) 0 March 6th 08 08:47 PM
creating a formul George A. Yorks Excel Discussion (Misc queries) 43 October 13th 06 10:36 PM
IF Formul This is a homework Excel Worksheet Functions 1 October 30th 05 07:35 PM
formul that add 1.5 day, every end of month how to add 1.5 day every end of mon Excel Discussion (Misc queries) 2 April 20th 05 10:48 AM


All times are GMT +1. The time now is 03:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"