View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dick Kusleika[_3_] Dick Kusleika[_3_] is offline
external usenet poster
 
Posts: 599
Default Last Hope -HELP!! To Dick K

Marie

I tried it and it doesn't work. I think the problem is that I didn't

explain that the named range 'district number' is on a sheet named
historical and the 'branchtodistrict' is on another sheet named branches.
The only named range on the employees sheet is the 'list'. I thought as long
as the neamed ranges were in the same file it didn't matter. Like I said I
am new so the only reason I think this might be the problme is because of
the line that says 'with this workbook.worksheets("employees") But they
are all in the same file, is that considered the workbook? Can it be fixed?
I have tried but no luck. Please....

Names can be Workbook level names or Worksheet level names. I don't know
which yours are, but this should handle either situation


With ThisWorkbook.Worksheets("employees")
Set rDist = .Range("districtnumber")
Set rList = .Range("list")
Set rBTD = .Range("branchtodistrict")
End With


Change to

With ThisWorkbook
Set rDist = .Sheets("historical").Range("districtnumber")
Set rList = .Sheets("employees").Range("list")
Set rBTD = .Sheets("branches").Range("branchtodistrict")
End With

If that doesn't work, be specific about what doesn't work. If you're
getting an error, say what the error is. If you're just getting bad
results, then include what you expect them to be and what they are.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com