Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running an IF Then Statement

Status
Not open for further replies.

jhabey01

Programmer
Oct 7, 2013
51
US
Hi,
I Have the following code that basically looks a value in BC13 and BB13 and puts that value in c4 and c6 respectively. If the Value in BC however is HealthAlliance then I do want to run the code, so that is how I cam up with the following:

If .Range("bc13").Value <> HealthAlliance Then
.Range("C4").Value = .Range("bc13")
.Range("c6").Value = .Range("bb13")
.Range("BB13:BC500").Value = ""
.Range("A12").Select
End If


--> What is happing id that the code is running even if the value in BC13 is HealthAlliance. What is the proper way to do this?
Thanks
 
As written HealthAlliance is a variable name.

Is that what you want?

If you want to test for the string you need "HealthAlliance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top