Best way to find repeated matches?

  • Thread starter Thread starter Keith R
  • Start date Start date
K

Keith R

I came up with a worksheet formula that does what I need, which I was then
going to bring over to VBA to find matching rows and grab some additional
data:
 
The are two methods for converting worksheet formulas to VBA code.

Method 1 - If VBA has an equivalent function then change the code to VBA
function. A simple case of this is the IF function.

for worksheet
=if(condition,true,false)

for VBA
if condition then
true statements
else
false statenments
end if

Method 2 - use worksheet function in VBA
worksheet
=countif(A1:C5,">=5")

VBA
total = worksheetfunction.countif(Range("A1:C5"),">=5")


Sometimes you need to use a combination of Method 1 and Method 2
If you post your formul I can do the conversion if you have any problems.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top