View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Marie Marie is offline
external usenet poster
 
Posts: 143
Default Last Hope -HELP!!

Thanks so much for looking at this!

the 'list' is the column of branch numbers I am downloading that I want to choose/delete from - the 'branchtodistrict' is a column that has all the possible branch numbers from all the districts(the range I named 'branchtodistrict' is only one column, in the next column I have the corresponding district numbers, but I didn't include this column in the named range, is that my mistake?) - the 'district number' is a cell I named that will always have the correct district number - the number for the file I am calculating data for. I want to look at the district number and pull from the 'list' only corresponding branch numbers, if it doesn't go with that district then delet it.

Am I all wet on my code? I'm new at this but really trying...

"Dick Kusleika" wrote:

Marie

Need more info. What range is "list"? What range is "BranchToDistrict" and
"DistrictNumber"?

If c.Offset(0, 1).Value = Range("DistrictNumber").Value

Then
Offset(0, 1).Value
Else: Selection.EntireRow.Delete

End If


If every row is being deleted, then this is probably always false. The THEN
part of this doesn't make any sense. If "List" comprises more than one
column, that's probably the problem.

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