Thread: IF using VBA
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
confused confused is offline
external usenet poster
 
Posts: 193
Default IF using VBA

Thank you -- what if I want to add a message to another section -- it's
saying if Cell C5 has an amount greater than 13% then show this message at
the bottom of the page.

In
If .Range("C5") = .Value "13%" Then

With target

"Message:Please contact the ABM for the specific extended net list price per
part number."
Else
""
End If







"OssieMac" wrote:

I am not sure what values you want where but the following is an example of
the If/Then/Else and you can substitue the ranges you require.

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

--
Regards,

OssieMac


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