troubleshooting Question

Excel VBA question regarding using a string or variable as comparison operator in a IF condition

Avatar of stmoritz
stmoritz asked on
Microsoft Excel
32 Comments1 Solution350 ViewsLast Modified:
The user should define a certain number and define the way excel should compare it to a count. How is the correct syntax to code this?

So the user defines for example

Dim UserCountNumber as Double
Dim UserCountComparisonOperator as String

UserCountNumber = 9
UserCountComparisonOperator = ">="

If [xxx.object whatever].Count >= 9 Then...

So instead of using hard coded >= and 9, using the variables...??

Thanks for your help.
Join our community to see this answer!
Unlock 1 Answer and 32 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 32 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros