Thanks for the reply StephenR. I was thinking along the same lines and did the following:
On the SNSs sheet, I added a column B (shifted the others to the right) and use the following formula copied down:
This combines the scout name with either Pack or Council so each row is identified seperately. After the next scout is added to the sheet the code creates a named range :
that includes all rows and columns needed for the vlookup.
The code then selects the new scout sheet and places the vlookup formula:
newSht.Select
Range("B60") = "=VLOOKUP(B59,SNSNames,17,FALSE)"
Range("B61") = "=VLOOKUP(D59,SNSNames,17,FALSE)"
All the code runs without an error but I get a #N/A in B60 and B61 instead of 0 (since no values have yet been added to the scout's SNSs rows).
Any idea how to correct this?
Thanks,
Andrew
Bookmarks