Thread: Using Match
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RagDyeR RagDyeR is offline
external usenet poster
 
Posts: 3,572
Default Using Match

Instead of hard-coding your range references into the formula, create a
dynamic named range.

Debra Dalgleish has instructions he

http://www.contextures.com/xlNames01.html#Dynamic

--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

wrote in message
...
I am attempting to use VBA script to match two columns of data.

My problem is not the actual formula because I can do that, however;
since the number of rows changes on a daily basis I don't know how to
work in that variable in the formula

I have used =ISNA(MATCH(A2,$J$2:$J$15125)) and since it is a double
comparison

=ISNA(MATCH(J2,$A$2:$A$14753))

And then copied the formulas down in there respective columns until
the last entry.

Now my issue...

This is for a report that is run on a daily basis and the range
changes on a daily basis.

So Column A may go from A2~A14200 one day and A2~A13725 the next
and Column J may go in a simular fashion.

Can a macro be written that will automatically detect the size of each
set of data Columns A and J, write the formula down in the worksheet
and copy it for as far as necessary.

Thanks for your assistance.
Christopher