View Single Post
  #8   Report Post  
Harlan Grove
 
Posts: n/a
Default

"Dave Peterson" wrote...
....
But you're passing the date (as d) in:

Function ACNLookup( _
s As string, _
p As String, _
d As Variant _
) As Variant

I think one of these should be using p and one should be using d:

r = Application.Worksheet.Match(p, ws.Range("A4:A30"), 0)
c = Application.Worksheet.Match(p, ws.Range("B3:IV3"), 0)

If the dates are in row 3, then use D in the second line. If the
dates are in column A, then use it in the first line.

....

Yup, I should have written

c = Application.Worksheet.Match(d, ws.Range("B3:IV3"), 0)