Critera Range is ignoring second criteria in Current Region

49 Views Asked by At

When extracting and moving data, the first column of the criteria is working but the second criteria is not engaging. It is returning the movement for all stores if they had sold that item.

List of column headers.

  1. R2=Left Len,
  2. S2=Store

  3. A2=Left Len,

  4. B2=UPC,
  5. C2=Store,
  6. D2=Movement,

The file is just short of 900k rows of data in total.

I believe it to be an issue with Current Region.

Also need for this to return zero if there is no movement for that store. This will be repeated 39 more times to the right in order to get results for each location.

Ultimate goal is to find the Zero Movers that need to be addressed. So the rows of upc's would need to stay aligned with the criteria.

Any help would be greatly appreciated. Using Windows 7, Office 2016


Sub Find_Fill_Data()

Range("u2:x" & Range("x" & Rows.Count).End(xlUp).Row).ClearContents

Range("a2:D" & Range("D" & Rows.Count).End(xlUp).Row).AdvancedFilter Action:=xlFilterCopy, criteriarange:=Range("r2").CurrentRegion, copytorange:=Range("u2"), unique:=False


Range("q4").Select

End Sub

**Left Len  Item                             5  7   8     9**
1070002152  MILK DUDS THEATER BOX           123 254 181 196
1070002385  WHOPPERS MALT BALLS             19  0   28  42
1070002440  WHOPPERS MALT BALLS             92  188 79  133
1070002660  WHOPPERS MALT BALLS             22  21  11  22
1070006080  CANDY BAR                       575 463 446 303
1070006611  WHOPPER ROBIN EGGS              22  28  25  0
1070008807  CANDY                           132 57  59  0
1070008813  THEATER BOX                     331 127 101 171
1070013272  J/RANCHER CRNCH CHEW ASST       61  0   0   0
1070050180  WHOPPERS MALT BALLS CARTN       119 24  99  99
0

There are 0 best solutions below