Thread: IF using VBA
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default IF using VBA

hi,

You posted to little code to be precise but try this. I don't of course know
what WITH statement you have enclosing this IF statement

If wsSource.Range("B6") = "Quarterly in Arrears" Then
.Range ("B8")
Else
.Range ("B9")
End If

Mike

"confused" wrote:

I was wondering if you could help me with a little vba .. I have some code
that populates a summary page .. I am needed to change this part where it's
populating the below code under quantity
.Range("E10") = wsSource.Range("B5")

Somehow I need it to populate .Range("E10") with a number based on another
field

so if wsSource.Range("B6")= "Quarterly in Arrears", .Range("B8"), Else
.Range("B9")

How do I do that? Thanks!