Macro- Delete 3 rows above and 14 below if cell contains text

ValiMandy

New Member
Joined
May 10, 2016
Messages
31
I would like a macro that will search for the following text phrases in column H and delete 3 rows above, the row the value is in and 14 rows after the value.

"Pallet 1 of 0"
"Pallet 2 of 0"
"Pallet 3 of 0"
"Pallet 2 of 1"
"Pallet 3 of 1"
"Pallet 3 of 2"

I have tried several codes and I am not sure what is the best way to approach this. I am still learning the basics of VBAs.

Thank you very much!
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Hi anyone who reads this thread:

Just so you know I found a way to make this work. It is really ugly and cumbersome but it works. It takes about 30 seconds each module to run on 2300 rows. Maybe this will perk someone's interest and they could tell me a way to simplify this macro? Like I said, I know it is ugly.:eeek:

I had to do two modules:


Code:
Sub CaseCount_DeleteBlankPages()

Range("H1:H2254").Value = Range("H1:H2254").Value


If Range("H2254").Value = "PALLET:  1 OF 0" Then
Range("A2251:A2268").EntireRow.Delete
End If


If Range("H2236").Value = "PALLET:  1 OF 0" Then
Range("A2233:A2250").EntireRow.Delete
End If


If Range("H2218").Value = "PALLET:  1 OF 0" Then
Range("A2215:A2232").EntireRow.Delete
End If


If Range("H2200").Value = "PALLET:  1 OF 0" Then
Range("A2197:A2214").EntireRow.Delete
End If


If Range("H2182").Value = "PALLET:  1 OF 0" Then
Range("A2179:A2196").EntireRow.Delete
End If


If Range("H2164").Value = "PALLET:  1 OF 0" Then
Range("A2161:A2178").EntireRow.Delete
End If


If Range("H2146").Value = "PALLET:  1 OF 0" Then
Range("A2143:A2160").EntireRow.Delete
End If


If Range("H2128").Value = "PALLET:  1 OF 0" Then
Range("A2125:A2142").EntireRow.Delete
End If


If Range("H2110").Value = "PALLET:  1 OF 0" Then
Range("A2107:A2124").EntireRow.Delete
End If


If Range("H2092").Value = "PALLET:  1 OF 0" Then
Range("A2089:A2106").EntireRow.Delete
End If


If Range("H2074").Value = "PALLET:  1 OF 0" Then
Range("A2071:A2088").EntireRow.Delete
End If


If Range("H2056").Value = "PALLET:  1 OF 0" Then
Range("A2053:A2070").EntireRow.Delete
End If


If Range("H2038").Value = "PALLET:  1 OF 0" Then
Range("A2035:A2052").EntireRow.Delete
End If


If Range("H2020").Value = "PALLET:  1 OF 0" Then
Range("A2017:A2034").EntireRow.Delete
End If


If Range("H2002").Value = "PALLET:  1 OF 0" Then
Range("A1999:A2016").EntireRow.Delete
End If


If Range("H1984").Value = "PALLET:  1 OF 0" Then
Range("A1981:A1998").EntireRow.Delete
End If


If Range("H1966").Value = "PALLET:  1 OF 0" Then
Range("A1963:A1980").EntireRow.Delete
End If


If Range("H1948").Value = "PALLET:  1 OF 0" Then
Range("A1945:A1962").EntireRow.Delete
End If


If Range("H1930").Value = "PALLET:  1 OF 0" Then
Range("A1927:A1944").EntireRow.Delete
End If


If Range("H1912").Value = "PALLET:  1 OF 0" Then
Range("A1909:A1926").EntireRow.Delete
End If


If Range("H1894").Value = "PALLET:  1 OF 0" Then
Range("A1891:A1908").EntireRow.Delete
End If


If Range("H1876").Value = "PALLET:  1 OF 0" Then
Range("A1873:A1890").EntireRow.Delete
End If


If Range("H1858").Value = "PALLET:  1 OF 0" Then
Range("A1855:A1872").EntireRow.Delete
End If


If Range("H1840").Value = "PALLET:  1 OF 0" Then
Range("A1837:A1854").EntireRow.Delete
End If


If Range("H1822").Value = "PALLET:  1 OF 0" Then
Range("A1819:A1836").EntireRow.Delete
End If


If Range("H1804").Value = "PALLET:  1 OF 0" Then
Range("A1801:A1818").EntireRow.Delete
End If


If Range("H1786").Value = "PALLET:  1 OF 0" Then
Range("A1783:A1800").EntireRow.Delete
End If


If Range("H1768").Value = "PALLET:  1 OF 0" Then
Range("A1765:A1782").EntireRow.Delete
End If


If Range("H1750").Value = "PALLET:  1 OF 0" Then
Range("A1747:A1764").EntireRow.Delete
End If


If Range("H1732").Value = "PALLET:  1 OF 0" Then
Range("A1729:A1746").EntireRow.Delete
End If


If Range("H1714").Value = "PALLET:  1 OF 0" Then
Range("A1711:A1728").EntireRow.Delete
End If


If Range("H1696").Value = "PALLET:  1 OF 0" Then
Range("A1693:A1710").EntireRow.Delete
End If


If Range("H1678").Value = "PALLET:  1 OF 0" Then
Range("A1675:A1692").EntireRow.Delete
End If


If Range("H1660").Value = "PALLET:  1 OF 0" Then
Range("A1657:A1674").EntireRow.Delete
End If


If Range("H1642").Value = "PALLET:  1 OF 0" Then
Range("A1639:A1656").EntireRow.Delete
End If


If Range("H1624").Value = "PALLET:  1 OF 0" Then
Range("A1621:A1638").EntireRow.Delete
End If


If Range("H1606").Value = "PALLET:  1 OF 0" Then
Range("A1603:A1620").EntireRow.Delete
End If


If Range("H1588").Value = "PALLET:  1 OF 0" Then
Range("A1585:A1602").EntireRow.Delete
End If


If Range("H1570").Value = "PALLET:  1 OF 0" Then
Range("A1567:A1584").EntireRow.Delete
End If


If Range("H1552").Value = "PALLET:  1 OF 0" Then
Range("A1549:A1566").EntireRow.Delete
End If


If Range("H1534").Value = "PALLET:  1 OF 0" Then
Range("A1531:A1548").EntireRow.Delete
End If


If Range("H1516").Value = "PALLET:  1 OF 0" Then
Range("A1513:A1530").EntireRow.Delete
End If


If Range("H1498").Value = "PALLET:  1 OF 0" Then
Range("A1495:A1512").EntireRow.Delete
End If


If Range("H1480").Value = "PALLET:  1 OF 0" Then
Range("A1477:A1494").EntireRow.Delete
End If


If Range("H1462").Value = "PALLET:  1 OF 0" Then
Range("A1459:A1476").EntireRow.Delete
End If


If Range("H1444").Value = "PALLET:  1 OF 0" Then
Range("A1441:A1458").EntireRow.Delete
End If


If Range("H1426").Value = "PALLET:  1 OF 0" Then
Range("A1423:A1440").EntireRow.Delete
End If


If Range("H1408").Value = "PALLET:  1 OF 0" Then
Range("A1405:A1422").EntireRow.Delete
End If


If Range("H1390").Value = "PALLET:  1 OF 0" Then
Range("A1387:A1404").EntireRow.Delete
End If


If Range("H1372").Value = "PALLET:  1 OF 0" Then
Range("A1369:A1386").EntireRow.Delete
End If


If Range("H1354").Value = "PALLET:  1 OF 0" Then
Range("A1351:A1368").EntireRow.Delete
End If


If Range("H1336").Value = "PALLET:  1 OF 0" Then
Range("A1333:A1350").EntireRow.Delete
End If


If Range("H1318").Value = "PALLET:  1 OF 0" Then
Range("A1315:A1332").EntireRow.Delete
End If


If Range("H1300").Value = "PALLET:  1 OF 0" Then
Range("A1297:A1314").EntireRow.Delete
End If


If Range("H1282").Value = "PALLET:  1 OF 0" Then
Range("A1279:A1296").EntireRow.Delete
End If


If Range("H1264").Value = "PALLET:  1 OF 0" Then
Range("A1261:A1278").EntireRow.Delete
End If


If Range("H1246").Value = "PALLET:  1 OF 0" Then
Range("A1243:A1260").EntireRow.Delete
End If


If Range("H1228").Value = "PALLET:  1 OF 0" Then
Range("A1225:A1242").EntireRow.Delete
End If


If Range("H1210").Value = "PALLET:  1 OF 0" Then
Range("A1207:A1224").EntireRow.Delete
End If


If Range("H1192").Value = "PALLET:  1 OF 0" Then
Range("A1189:A1206").EntireRow.Delete
End If


If Range("H1174").Value = "PALLET:  1 OF 0" Then
Range("A1171:A1188").EntireRow.Delete
End If


If Range("H1156").Value = "PALLET:  1 OF 0" Then
Range("A1153:A1170").EntireRow.Delete
End If


If Range("H1138").Value = "PALLET:  1 OF 0" Then
Range("A1135:A1152").EntireRow.Delete
End If


If Range("H1120").Value = "PALLET:  1 OF 0" Then
Range("A1117:A1134").EntireRow.Delete
End If


If Range("H1102").Value = "PALLET:  1 OF 0" Then
Range("A1099:A1116").EntireRow.Delete
End If


If Range("H1084").Value = "PALLET:  1 OF 0" Then
Range("A1081:A1098").EntireRow.Delete
End If


If Range("H1066").Value = "PALLET:  1 OF 0" Then
Range("A1063:A1080").EntireRow.Delete
End If


If Range("H1048").Value = "PALLET:  1 OF 0" Then
Range("A1045:A1062").EntireRow.Delete
End If


If Range("H1030").Value = "PALLET:  1 OF 0" Then
Range("A1027:A1044").EntireRow.Delete
End If


If Range("H1012").Value = "PALLET:  1 OF 0" Then
Range("A1009:A1026").EntireRow.Delete
End If


If Range("H994").Value = "PALLET:  1 OF 0" Then
Range("A991:A1008").EntireRow.Delete
End If


If Range("H976").Value = "PALLET:  1 OF 0" Then
Range("A973:A990").EntireRow.Delete
End If


If Range("H958").Value = "PALLET:  1 OF 0" Then
Range("A955:A972").EntireRow.Delete
End If


If Range("H940").Value = "PALLET:  1 OF 0" Then
Range("A937:A954").EntireRow.Delete
End If


If Range("H922").Value = "PALLET:  1 OF 0" Then
Range("A919:A936").EntireRow.Delete
End If


If Range("H904").Value = "PALLET:  1 OF 0" Then
Range("A901:A918").EntireRow.Delete
End If


If Range("H886").Value = "PALLET:  1 OF 0" Then
Range("A883:A900").EntireRow.Delete
End If


If Range("H868").Value = "PALLET:  1 OF 0" Then
Range("A865:A882").EntireRow.Delete
End If


If Range("H850").Value = "PALLET:  1 OF 0" Then
Range("A847:A864").EntireRow.Delete
End If


If Range("H832").Value = "PALLET:  1 OF 0" Then
Range("A829:A846").EntireRow.Delete
End If


If Range("H814").Value = "PALLET:  1 OF 0" Then
Range("A811:A828").EntireRow.Delete
End If


If Range("H796").Value = "PALLET:  1 OF 0" Then
Range("A793:A810").EntireRow.Delete
End If


If Range("H778").Value = "PALLET:  1 OF 0" Then
Range("A775:A792").EntireRow.Delete
End If


If Range("H760").Value = "PALLET:  1 OF 0" Then
Range("A757:A774").EntireRow.Delete
End If


If Range("H742").Value = "PALLET:  1 OF 0" Then
Range("A739:A756").EntireRow.Delete
End If


If Range("H724").Value = "PALLET:  1 OF 0" Then
Range("A721:A738").EntireRow.Delete
End If


If Range("H706").Value = "PALLET:  1 OF 0" Then
Range("A703:A720").EntireRow.Delete
End If


If Range("H688").Value = "PALLET:  1 OF 0" Then
Range("A685:A702").EntireRow.Delete
End If


If Range("H670").Value = "PALLET:  1 OF 0" Then
Range("A667:A684").EntireRow.Delete
End If


If Range("H652").Value = "PALLET:  1 OF 0" Then
Range("A649:A666").EntireRow.Delete
End If


If Range("H634").Value = "PALLET:  1 OF 0" Then
Range("A631:A648").EntireRow.Delete
End If


If Range("H616").Value = "PALLET:  1 OF 0" Then
Range("A613:A630").EntireRow.Delete
End If


If Range("H598").Value = "PALLET:  1 OF 0" Then
Range("A595:A612").EntireRow.Delete
End If


If Range("H580").Value = "PALLET:  1 OF 0" Then
Range("A577:A594").EntireRow.Delete
End If


If Range("H562").Value = "PALLET:  1 OF 0" Then
Range("A559:A576").EntireRow.Delete
End If


If Range("H544").Value = "PALLET:  1 OF 0" Then
Range("A541:A558").EntireRow.Delete
End If


If Range("H526").Value = "PALLET:  1 OF 0" Then
Range("A523:A540").EntireRow.Delete
End If


If Range("H508").Value = "PALLET:  1 OF 0" Then
Range("A505:A522").EntireRow.Delete
End If


If Range("H490").Value = "PALLET:  1 OF 0" Then
Range("A487:A504").EntireRow.Delete
End If


If Range("H472").Value = "PALLET:  1 OF 0" Then
Range("A469:A486").EntireRow.Delete
End If


If Range("H454").Value = "PALLET:  1 OF 0" Then
Range("A451:A468").EntireRow.Delete
End If


If Range("H436").Value = "PALLET:  1 OF 0" Then
Range("A433:A450").EntireRow.Delete
End If


If Range("H418").Value = "PALLET:  1 OF 0" Then
Range("A415:A432").EntireRow.Delete
End If


If Range("H400").Value = "PALLET:  1 OF 0" Then
Range("A397:A414").EntireRow.Delete
End If


If Range("H382").Value = "PALLET:  1 OF 0" Then
Range("A379:A396").EntireRow.Delete
End If


If Range("H364").Value = "PALLET:  1 OF 0" Then
Range("A361:A378").EntireRow.Delete
End If


If Range("H346").Value = "PALLET:  1 OF 0" Then
Range("A343:A360").EntireRow.Delete
End If


If Range("H328").Value = "PALLET:  1 OF 0" Then
Range("A325:A342").EntireRow.Delete
End If


If Range("H310").Value = "PALLET:  1 OF 0" Then
Range("A307:A324").EntireRow.Delete
End If


If Range("H292").Value = "PALLET:  1 OF 0" Then
Range("A289:A306").EntireRow.Delete
End If


If Range("H274").Value = "PALLET:  1 OF 0" Then
Range("A271:A288").EntireRow.Delete
End If


If Range("H256").Value = "PALLET:  1 OF 0" Then
Range("A253:A270").EntireRow.Delete
End If


If Range("H238").Value = "PALLET:  1 OF 0" Then
Range("A235:A252").EntireRow.Delete
End If


If Range("H220").Value = "PALLET:  1 OF 0" Then
Range("A217:A234").EntireRow.Delete
End If


If Range("H202").Value = "PALLET:  1 OF 0" Then
Range("A199:A216").EntireRow.Delete
End If


If Range("H184").Value = "PALLET:  1 OF 0" Then
Range("A181:A198").EntireRow.Delete
End If


If Range("H166").Value = "PALLET:  1 OF 0" Then
Range("A163:A180").EntireRow.Delete
End If


If Range("H148").Value = "PALLET:  1 OF 0" Then
Range("A145:A162").EntireRow.Delete
End If


If Range("H130").Value = "PALLET:  1 OF 0" Then
Range("A127:A144").EntireRow.Delete
End If


If Range("H112").Value = "PALLET:  1 OF 0" Then
Range("A109:A126").EntireRow.Delete
End If


If Range("H94").Value = "PALLET:  1 OF 0" Then
Range("A91:A108").EntireRow.Delete
End If


If Range("H76").Value = "PALLET:  1 OF 0" Then
Range("A73:A90").EntireRow.Delete
End If


If Range("H58").Value = "PALLET:  1 OF 0" Then
Range("A55:A72").EntireRow.Delete
End If


If Range("H40").Value = "PALLET:  1 OF 0" Then
Range("A37:A54").EntireRow.Delete
End If


If Range("H22").Value = "PALLET:  1 OF 0" Then
Range("A19:A36").EntireRow.Delete
End If


If Range("H4").Value = "PALLET:  1 OF 0" Then
Range("A1:A18").EntireRow.Delete
End If


If Range("H2254").Value = "PALLET:  2 OF 0" Then
Range("A2251:A2268").EntireRow.Delete
End If


If Range("H2236").Value = "PALLET:  2 OF 0" Then
Range("A2233:A2250").EntireRow.Delete
End If


If Range("H2218").Value = "PALLET:  2 OF 0" Then
Range("A2215:A2232").EntireRow.Delete
End If


If Range("H2200").Value = "PALLET:  2 OF 0" Then
Range("A2197:A2214").EntireRow.Delete
End If


If Range("H2182").Value = "PALLET:  2 OF 0" Then
Range("A2179:A2196").EntireRow.Delete
End If


If Range("H2164").Value = "PALLET:  2 OF 0" Then
Range("A2161:A2178").EntireRow.Delete
End If


If Range("H2146").Value = "PALLET:  2 OF 0" Then
Range("A2143:A2160").EntireRow.Delete
End If


If Range("H2128").Value = "PALLET:  2 OF 0" Then
Range("A2125:A2142").EntireRow.Delete
End If


If Range("H2110").Value = "PALLET:  2 OF 0" Then
Range("A2107:A2124").EntireRow.Delete
End If


If Range("H2092").Value = "PALLET:  2 OF 0" Then
Range("A2089:A2106").EntireRow.Delete
End If


If Range("H2074").Value = "PALLET:  2 OF 0" Then
Range("A2071:A2088").EntireRow.Delete
End If


If Range("H2056").Value = "PALLET:  2 OF 0" Then
Range("A2053:A2070").EntireRow.Delete
End If


If Range("H2038").Value = "PALLET:  2 OF 0" Then
Range("A2035:A2052").EntireRow.Delete
End If


If Range("H2020").Value = "PALLET:  2 OF 0" Then
Range("A2017:A2034").EntireRow.Delete
End If


If Range("H2002").Value = "PALLET:  2 OF 0" Then
Range("A1999:A2016").EntireRow.Delete
End If


If Range("H1984").Value = "PALLET:  2 OF 0" Then
Range("A1981:A1998").EntireRow.Delete
End If


If Range("H1966").Value = "PALLET:  2 OF 0" Then
Range("A1963:A1980").EntireRow.Delete
End If


If Range("H1948").Value = "PALLET:  2 OF 0" Then
Range("A1945:A1962").EntireRow.Delete
End If


If Range("H1930").Value = "PALLET:  2 OF 0" Then
Range("A1927:A1944").EntireRow.Delete
End If


If Range("H1912").Value = "PALLET:  2 OF 0" Then
Range("A1909:A1926").EntireRow.Delete
End If


If Range("H1894").Value = "PALLET:  2 OF 0" Then
Range("A1891:A1908").EntireRow.Delete
End If


If Range("H1876").Value = "PALLET:  2 OF 0" Then
Range("A1873:A1890").EntireRow.Delete
End If


If Range("H1858").Value = "PALLET:  2 OF 0" Then
Range("A1855:A1872").EntireRow.Delete
End If


If Range("H1840").Value = "PALLET:  2 OF 0" Then
Range("A1837:A1854").EntireRow.Delete
End If


If Range("H1822").Value = "PALLET:  2 OF 0" Then
Range("A1819:A1836").EntireRow.Delete
End If


If Range("H1804").Value = "PALLET:  2 OF 0" Then
Range("A1801:A1818").EntireRow.Delete
End If


If Range("H1786").Value = "PALLET:  2 OF 0" Then
Range("A1783:A1800").EntireRow.Delete
End If


If Range("H1768").Value = "PALLET:  2 OF 0" Then
Range("A1765:A1782").EntireRow.Delete
End If


If Range("H1750").Value = "PALLET:  2 OF 0" Then
Range("A1747:A1764").EntireRow.Delete
End If


If Range("H1732").Value = "PALLET:  2 OF 0" Then
Range("A1729:A1746").EntireRow.Delete
End If


If Range("H1714").Value = "PALLET:  2 OF 0" Then
Range("A1711:A1728").EntireRow.Delete
End If


If Range("H1696").Value = "PALLET:  2 OF 0" Then
Range("A1693:A1710").EntireRow.Delete
End If


If Range("H1678").Value = "PALLET:  2 OF 0" Then
Range("A1675:A1692").EntireRow.Delete
End If


If Range("H1660").Value = "PALLET:  2 OF 0" Then
Range("A1657:A1674").EntireRow.Delete
End If


If Range("H1642").Value = "PALLET:  2 OF 0" Then
Range("A1639:A1656").EntireRow.Delete
End If


If Range("H1624").Value = "PALLET:  2 OF 0" Then
Range("A1621:A1638").EntireRow.Delete
End If


If Range("H1606").Value = "PALLET:  2 OF 0" Then
Range("A1603:A1620").EntireRow.Delete
End If


If Range("H1588").Value = "PALLET:  2 OF 0" Then
Range("A1585:A1602").EntireRow.Delete
End If


If Range("H1570").Value = "PALLET:  2 OF 0" Then
Range("A1567:A1584").EntireRow.Delete
End If


If Range("H1552").Value = "PALLET:  2 OF 0" Then
Range("A1549:A1566").EntireRow.Delete
End If


If Range("H1534").Value = "PALLET:  2 OF 0" Then
Range("A1531:A1548").EntireRow.Delete
End If


If Range("H1516").Value = "PALLET:  2 OF 0" Then
Range("A1513:A1530").EntireRow.Delete
End If


If Range("H1498").Value = "PALLET:  2 OF 0" Then
Range("A1495:A1512").EntireRow.Delete
End If


If Range("H1480").Value = "PALLET:  2 OF 0" Then
Range("A1477:A1494").EntireRow.Delete
End If


If Range("H1462").Value = "PALLET:  2 OF 0" Then
Range("A1459:A1476").EntireRow.Delete
End If


If Range("H1444").Value = "PALLET:  2 OF 0" Then
Range("A1441:A1458").EntireRow.Delete
End If


If Range("H1426").Value = "PALLET:  2 OF 0" Then
Range("A1423:A1440").EntireRow.Delete
End If


If Range("H1408").Value = "PALLET:  2 OF 0" Then
Range("A1405:A1422").EntireRow.Delete
End If


If Range("H1390").Value = "PALLET:  2 OF 0" Then
Range("A1387:A1404").EntireRow.Delete
End If


If Range("H1372").Value = "PALLET:  2 OF 0" Then
Range("A1369:A1386").EntireRow.Delete
End If


If Range("H1354").Value = "PALLET:  2 OF 0" Then
Range("A1351:A1368").EntireRow.Delete
End If


If Range("H1336").Value = "PALLET:  2 OF 0" Then
Range("A1333:A1350").EntireRow.Delete
End If


If Range("H1318").Value = "PALLET:  2 OF 0" Then
Range("A1315:A1332").EntireRow.Delete
End If


If Range("H1300").Value = "PALLET:  2 OF 0" Then
Range("A1297:A1314").EntireRow.Delete
End If


If Range("H1282").Value = "PALLET:  2 OF 0" Then
Range("A1279:A1296").EntireRow.Delete
End If


If Range("H1264").Value = "PALLET:  2 OF 0" Then
Range("A1261:A1278").EntireRow.Delete
End If


If Range("H1246").Value = "PALLET:  2 OF 0" Then
Range("A1243:A1260").EntireRow.Delete
End If


If Range("H1228").Value = "PALLET:  2 OF 0" Then
Range("A1225:A1242").EntireRow.Delete
End If


If Range("H1210").Value = "PALLET:  2 OF 0" Then
Range("A1207:A1224").EntireRow.Delete
End If


If Range("H1192").Value = "PALLET:  2 OF 0" Then
Range("A1189:A1206").EntireRow.Delete
End If


If Range("H1174").Value = "PALLET:  2 OF 0" Then
Range("A1171:A1188").EntireRow.Delete
End If


If Range("H1156").Value = "PALLET:  2 OF 0" Then
Range("A1153:A1170").EntireRow.Delete
End If


If Range("H1138").Value = "PALLET:  2 OF 0" Then
Range("A1135:A1152").EntireRow.Delete
End If


If Range("H1120").Value = "PALLET:  2 OF 0" Then
Range("A1117:A1134").EntireRow.Delete
End If


If Range("H1102").Value = "PALLET:  2 OF 0" Then
Range("A1099:A1116").EntireRow.Delete
End If


If Range("H1084").Value = "PALLET:  2 OF 0" Then
Range("A1081:A1098").EntireRow.Delete
End If


If Range("H1066").Value = "PALLET:  2 OF 0" Then
Range("A1063:A1080").EntireRow.Delete
End If


If Range("H1048").Value = "PALLET:  2 OF 0" Then
Range("A1045:A1062").EntireRow.Delete
End If


If Range("H1030").Value = "PALLET:  2 OF 0" Then
Range("A1027:A1044").EntireRow.Delete
End If


If Range("H1012").Value = "PALLET:  2 OF 0" Then
Range("A1009:A1026").EntireRow.Delete
End If


If Range("H994").Value = "PALLET:  2 OF 0" Then
Range("A991:A1008").EntireRow.Delete
End If


If Range("H976").Value = "PALLET:  2 OF 0" Then
Range("A973:A990").EntireRow.Delete
End If


If Range("H958").Value = "PALLET:  2 OF 0" Then
Range("A955:A972").EntireRow.Delete
End If


If Range("H940").Value = "PALLET:  2 OF 0" Then
Range("A937:A954").EntireRow.Delete
End If


If Range("H922").Value = "PALLET:  2 OF 0" Then
Range("A919:A936").EntireRow.Delete
End If


If Range("H904").Value = "PALLET:  2 OF 0" Then
Range("A901:A918").EntireRow.Delete
End If


If Range("H886").Value = "PALLET:  2 OF 0" Then
Range("A883:A900").EntireRow.Delete
End If


If Range("H868").Value = "PALLET:  2 OF 0" Then
Range("A865:A882").EntireRow.Delete
End If


If Range("H850").Value = "PALLET:  2 OF 0" Then
Range("A847:A864").EntireRow.Delete
End If


If Range("H832").Value = "PALLET:  2 OF 0" Then
Range("A829:A846").EntireRow.Delete
End If


If Range("H814").Value = "PALLET:  2 OF 0" Then
Range("A811:A828").EntireRow.Delete
End If


If Range("H796").Value = "PALLET:  2 OF 0" Then
Range("A793:A810").EntireRow.Delete
End If


If Range("H778").Value = "PALLET:  2 OF 0" Then
Range("A775:A792").EntireRow.Delete
End If


If Range("H760").Value = "PALLET:  2 OF 0" Then
Range("A757:A774").EntireRow.Delete
End If


If Range("H742").Value = "PALLET:  2 OF 0" Then
Range("A739:A756").EntireRow.Delete
End If


If Range("H724").Value = "PALLET:  2 OF 0" Then
Range("A721:A738").EntireRow.Delete
End If


If Range("H706").Value = "PALLET:  2 OF 0" Then
Range("A703:A720").EntireRow.Delete
End If


If Range("H688").Value = "PALLET:  2 OF 0" Then
Range("A685:A702").EntireRow.Delete
End If


If Range("H670").Value = "PALLET:  2 OF 0" Then
Range("A667:A684").EntireRow.Delete
End If


If Range("H652").Value = "PALLET:  2 OF 0" Then
Range("A649:A666").EntireRow.Delete
End If


If Range("H634").Value = "PALLET:  2 OF 0" Then
Range("A631:A648").EntireRow.Delete
End If


If Range("H616").Value = "PALLET:  2 OF 0" Then
Range("A613:A630").EntireRow.Delete
End If


If Range("H598").Value = "PALLET:  2 OF 0" Then
Range("A595:A612").EntireRow.Delete
End If


If Range("H580").Value = "PALLET:  2 OF 0" Then
Range("A577:A594").EntireRow.Delete
End If


If Range("H562").Value = "PALLET:  2 OF 0" Then
Range("A559:A576").EntireRow.Delete
End If


If Range("H544").Value = "PALLET:  2 OF 0" Then
Range("A541:A558").EntireRow.Delete
End If


If Range("H526").Value = "PALLET:  2 OF 0" Then
Range("A523:A540").EntireRow.Delete
End If


If Range("H508").Value = "PALLET:  2 OF 0" Then
Range("A505:A522").EntireRow.Delete
End If


If Range("H490").Value = "PALLET:  2 OF 0" Then
Range("A487:A504").EntireRow.Delete
End If


If Range("H472").Value = "PALLET:  2 OF 0" Then
Range("A469:A486").EntireRow.Delete
End If


If Range("H454").Value = "PALLET:  2 OF 0" Then
Range("A451:A468").EntireRow.Delete
End If


If Range("H436").Value = "PALLET:  2 OF 0" Then
Range("A433:A450").EntireRow.Delete
End If


If Range("H418").Value = "PALLET:  2 OF 0" Then
Range("A415:A432").EntireRow.Delete
End If


If Range("H400").Value = "PALLET:  2 OF 0" Then
Range("A397:A414").EntireRow.Delete
End If


If Range("H382").Value = "PALLET:  2 OF 0" Then
Range("A379:A396").EntireRow.Delete
End If


If Range("H364").Value = "PALLET:  2 OF 0" Then
Range("A361:A378").EntireRow.Delete
End If


If Range("H346").Value = "PALLET:  2 OF 0" Then
Range("A343:A360").EntireRow.Delete
End If


If Range("H328").Value = "PALLET:  2 OF 0" Then
Range("A325:A342").EntireRow.Delete
End If


If Range("H310").Value = "PALLET:  2 OF 0" Then
Range("A307:A324").EntireRow.Delete
End If


If Range("H292").Value = "PALLET:  2 OF 0" Then
Range("A289:A306").EntireRow.Delete
End If


If Range("H274").Value = "PALLET:  2 OF 0" Then
Range("A271:A288").EntireRow.Delete
End If


If Range("H256").Value = "PALLET:  2 OF 0" Then
Range("A253:A270").EntireRow.Delete
End If


If Range("H238").Value = "PALLET:  2 OF 0" Then
Range("A235:A252").EntireRow.Delete
End If


If Range("H220").Value = "PALLET:  2 OF 0" Then
Range("A217:A234").EntireRow.Delete
End If


If Range("H202").Value = "PALLET:  2 OF 0" Then
Range("A199:A216").EntireRow.Delete
End If


If Range("H184").Value = "PALLET:  2 OF 0" Then
Range("A181:A198").EntireRow.Delete
End If


If Range("H166").Value = "PALLET:  2 OF 0" Then
Range("A163:A180").EntireRow.Delete
End If


If Range("H148").Value = "PALLET:  2 OF 0" Then
Range("A145:A162").EntireRow.Delete
End If


If Range("H130").Value = "PALLET:  2 OF 0" Then
Range("A127:A144").EntireRow.Delete
End If


If Range("H112").Value = "PALLET:  2 OF 0" Then
Range("A109:A126").EntireRow.Delete
End If


If Range("H94").Value = "PALLET:  2 OF 0" Then
Range("A91:A108").EntireRow.Delete
End If


If Range("H76").Value = "PALLET:  2 OF 0" Then
Range("A73:A90").EntireRow.Delete
End If


If Range("H58").Value = "PALLET:  2 OF 0" Then
Range("A55:A72").EntireRow.Delete
End If


If Range("H40").Value = "PALLET:  2 OF 0" Then
Range("A37:A54").EntireRow.Delete
End If


If Range("H22").Value = "PALLET:  2 OF 0" Then
Range("A19:A36").EntireRow.Delete
End If


If Range("H4").Value = "PALLET:  2 OF 0" Then
Range("A1:A18").EntireRow.Delete
End If


If Range("H2254").Value = "PALLET:  3 OF 0" Then
Range("A2251:A2268").EntireRow.Delete
End If


If Range("H2236").Value = "PALLET:  3 OF 0" Then
Range("A2233:A2250").EntireRow.Delete
End If


If Range("H2218").Value = "PALLET:  3 OF 0" Then
Range("A2215:A2232").EntireRow.Delete
End If


If Range("H2200").Value = "PALLET:  3 OF 0" Then
Range("A2197:A2214").EntireRow.Delete
End If


If Range("H2182").Value = "PALLET:  3 OF 0" Then
Range("A2179:A2196").EntireRow.Delete
End If


If Range("H2164").Value = "PALLET:  3 OF 0" Then
Range("A2161:A2178").EntireRow.Delete
End If


If Range("H2146").Value = "PALLET:  3 OF 0" Then
Range("A2143:A2160").EntireRow.Delete
End If


If Range("H2128").Value = "PALLET:  3 OF 0" Then
Range("A2125:A2142").EntireRow.Delete
End If


If Range("H2110").Value = "PALLET:  3 OF 0" Then
Range("A2107:A2124").EntireRow.Delete
End If


If Range("H2092").Value = "PALLET:  3 OF 0" Then
Range("A2089:A2106").EntireRow.Delete
End If


If Range("H2074").Value = "PALLET:  3 OF 0" Then
Range("A2071:A2088").EntireRow.Delete
End If


If Range("H2056").Value = "PALLET:  3 OF 0" Then
Range("A2053:A2070").EntireRow.Delete
End If


If Range("H2038").Value = "PALLET:  3 OF 0" Then
Range("A2035:A2052").EntireRow.Delete
End If


If Range("H2020").Value = "PALLET:  3 OF 0" Then
Range("A2017:A2034").EntireRow.Delete
End If


If Range("H2002").Value = "PALLET:  3 OF 0" Then
Range("A1999:A2016").EntireRow.Delete
End If


If Range("H1984").Value = "PALLET:  3 OF 0" Then
Range("A1981:A1998").EntireRow.Delete
End If


If Range("H1966").Value = "PALLET:  3 OF 0" Then
Range("A1963:A1980").EntireRow.Delete
End If


If Range("H1948").Value = "PALLET:  3 OF 0" Then
Range("A1945:A1962").EntireRow.Delete
End If


If Range("H1930").Value = "PALLET:  3 OF 0" Then
Range("A1927:A1944").EntireRow.Delete
End If


If Range("H1912").Value = "PALLET:  3 OF 0" Then
Range("A1909:A1926").EntireRow.Delete
End If


If Range("H1894").Value = "PALLET:  3 OF 0" Then
Range("A1891:A1908").EntireRow.Delete
End If


If Range("H1876").Value = "PALLET:  3 OF 0" Then
Range("A1873:A1890").EntireRow.Delete
End If


If Range("H1858").Value = "PALLET:  3 OF 0" Then
Range("A1855:A1872").EntireRow.Delete
End If


If Range("H1840").Value = "PALLET:  3 OF 0" Then
Range("A1837:A1854").EntireRow.Delete
End If


If Range("H1822").Value = "PALLET:  3 OF 0" Then
Range("A1819:A1836").EntireRow.Delete
End If


If Range("H1804").Value = "PALLET:  3 OF 0" Then
Range("A1801:A1818").EntireRow.Delete
End If


If Range("H1786").Value = "PALLET:  3 OF 0" Then
Range("A1783:A1800").EntireRow.Delete
End If


If Range("H1768").Value = "PALLET:  3 OF 0" Then
Range("A1765:A1782").EntireRow.Delete
End If


If Range("H1750").Value = "PALLET:  3 OF 0" Then
Range("A1747:A1764").EntireRow.Delete
End If


If Range("H1732").Value = "PALLET:  3 OF 0" Then
Range("A1729:A1746").EntireRow.Delete
End If


If Range("H1714").Value = "PALLET:  3 OF 0" Then
Range("A1711:A1728").EntireRow.Delete
End If


If Range("H1696").Value = "PALLET:  3 OF 0" Then
Range("A1693:A1710").EntireRow.Delete
End If


If Range("H1678").Value = "PALLET:  3 OF 0" Then
Range("A1675:A1692").EntireRow.Delete
End If


If Range("H1660").Value = "PALLET:  3 OF 0" Then
Range("A1657:A1674").EntireRow.Delete
End If


If Range("H1642").Value = "PALLET:  3 OF 0" Then
Range("A1639:A1656").EntireRow.Delete
End If


If Range("H1624").Value = "PALLET:  3 OF 0" Then
Range("A1621:A1638").EntireRow.Delete
End If


If Range("H1606").Value = "PALLET:  3 OF 0" Then
Range("A1603:A1620").EntireRow.Delete
End If


If Range("H1588").Value = "PALLET:  3 OF 0" Then
Range("A1585:A1602").EntireRow.Delete
End If


If Range("H1570").Value = "PALLET:  3 OF 0" Then
Range("A1567:A1584").EntireRow.Delete
End If


If Range("H1552").Value = "PALLET:  3 OF 0" Then
Range("A1549:A1566").EntireRow.Delete
End If


If Range("H1534").Value = "PALLET:  3 OF 0" Then
Range("A1531:A1548").EntireRow.Delete
End If


If Range("H1516").Value = "PALLET:  3 OF 0" Then
Range("A1513:A1530").EntireRow.Delete
End If


If Range("H1498").Value = "PALLET:  3 OF 0" Then
Range("A1495:A1512").EntireRow.Delete
End If


If Range("H1480").Value = "PALLET:  3 OF 0" Then
Range("A1477:A1494").EntireRow.Delete
End If


If Range("H1462").Value = "PALLET:  3 OF 0" Then
Range("A1459:A1476").EntireRow.Delete
End If


If Range("H1444").Value = "PALLET:  3 OF 0" Then
Range("A1441:A1458").EntireRow.Delete
End If


If Range("H1426").Value = "PALLET:  3 OF 0" Then
Range("A1423:A1440").EntireRow.Delete
End If


If Range("H1408").Value = "PALLET:  3 OF 0" Then
Range("A1405:A1422").EntireRow.Delete
End If


If Range("H1390").Value = "PALLET:  3 OF 0" Then
Range("A1387:A1404").EntireRow.Delete
End If


If Range("H1372").Value = "PALLET:  3 OF 0" Then
Range("A1369:A1386").EntireRow.Delete
End If


If Range("H1354").Value = "PALLET:  3 OF 0" Then
Range("A1351:A1368").EntireRow.Delete
End If


If Range("H1336").Value = "PALLET:  3 OF 0" Then
Range("A1333:A1350").EntireRow.Delete
End If


If Range("H1318").Value = "PALLET:  3 OF 0" Then
Range("A1315:A1332").EntireRow.Delete
End If


If Range("H1300").Value = "PALLET:  3 OF 0" Then
Range("A1297:A1314").EntireRow.Delete
End If


If Range("H1282").Value = "PALLET:  3 OF 0" Then
Range("A1279:A1296").EntireRow.Delete
End If


If Range("H1264").Value = "PALLET:  3 OF 0" Then
Range("A1261:A1278").EntireRow.Delete
End If


If Range("H1246").Value = "PALLET:  3 OF 0" Then
Range("A1243:A1260").EntireRow.Delete
End If


If Range("H1228").Value = "PALLET:  3 OF 0" Then
Range("A1225:A1242").EntireRow.Delete
End If


If Range("H1210").Value = "PALLET:  3 OF 0" Then
Range("A1207:A1224").EntireRow.Delete
End If


If Range("H1192").Value = "PALLET:  3 OF 0" Then
Range("A1189:A1206").EntireRow.Delete
End If


If Range("H1174").Value = "PALLET:  3 OF 0" Then
Range("A1171:A1188").EntireRow.Delete
End If


If Range("H1156").Value = "PALLET:  3 OF 0" Then
Range("A1153:A1170").EntireRow.Delete
End If


If Range("H1138").Value = "PALLET:  3 OF 0" Then
Range("A1135:A1152").EntireRow.Delete
End If


If Range("H1120").Value = "PALLET:  3 OF 0" Then
Range("A1117:A1134").EntireRow.Delete
End If


If Range("H1102").Value = "PALLET:  3 OF 0" Then
Range("A1099:A1116").EntireRow.Delete
End If


If Range("H1084").Value = "PALLET:  3 OF 0" Then
Range("A1081:A1098").EntireRow.Delete
End If


If Range("H1066").Value = "PALLET:  3 OF 0" Then
Range("A1063:A1080").EntireRow.Delete
End If


If Range("H1048").Value = "PALLET:  3 OF 0" Then
Range("A1045:A1062").EntireRow.Delete
End If


If Range("H1030").Value = "PALLET:  3 OF 0" Then
Range("A1027:A1044").EntireRow.Delete
End If


If Range("H1012").Value = "PALLET:  3 OF 0" Then
Range("A1009:A1026").EntireRow.Delete
End If


If Range("H994").Value = "PALLET:  3 OF 0" Then
Range("A991:A1008").EntireRow.Delete
End If


If Range("H976").Value = "PALLET:  3 OF 0" Then
Range("A973:A990").EntireRow.Delete
End If


If Range("H958").Value = "PALLET:  3 OF 0" Then
Range("A955:A972").EntireRow.Delete
End If


If Range("H940").Value = "PALLET:  3 OF 0" Then
Range("A937:A954").EntireRow.Delete
End If


If Range("H922").Value = "PALLET:  3 OF 0" Then
Range("A919:A936").EntireRow.Delete
End If


If Range("H904").Value = "PALLET:  3 OF 0" Then
Range("A901:A918").EntireRow.Delete
End If


If Range("H886").Value = "PALLET:  3 OF 0" Then
Range("A883:A900").EntireRow.Delete
End If


If Range("H868").Value = "PALLET:  3 OF 0" Then
Range("A865:A882").EntireRow.Delete
End If


If Range("H850").Value = "PALLET:  3 OF 0" Then
Range("A847:A864").EntireRow.Delete
End If


If Range("H832").Value = "PALLET:  3 OF 0" Then
Range("A829:A846").EntireRow.Delete
End If


If Range("H814").Value = "PALLET:  3 OF 0" Then
Range("A811:A828").EntireRow.Delete
End If


If Range("H796").Value = "PALLET:  3 OF 0" Then
Range("A793:A810").EntireRow.Delete
End If


If Range("H778").Value = "PALLET:  3 OF 0" Then
Range("A775:A792").EntireRow.Delete
End If


If Range("H760").Value = "PALLET:  3 OF 0" Then
Range("A757:A774").EntireRow.Delete
End If


If Range("H742").Value = "PALLET:  3 OF 0" Then
Range("A739:A756").EntireRow.Delete
End If


If Range("H724").Value = "PALLET:  3 OF 0" Then
Range("A721:A738").EntireRow.Delete
End If


If Range("H706").Value = "PALLET:  3 OF 0" Then
Range("A703:A720").EntireRow.Delete
End If


If Range("H688").Value = "PALLET:  3 OF 0" Then
Range("A685:A702").EntireRow.Delete
End If


If Range("H670").Value = "PALLET:  3 OF 0" Then
Range("A667:A684").EntireRow.Delete
End If


If Range("H652").Value = "PALLET:  3 OF 0" Then
Range("A649:A666").EntireRow.Delete
End If


If Range("H634").Value = "PALLET:  3 OF 0" Then
Range("A631:A648").EntireRow.Delete
End If


If Range("H616").Value = "PALLET:  3 OF 0" Then
Range("A613:A630").EntireRow.Delete
End If


If Range("H598").Value = "PALLET:  3 OF 0" Then
Range("A595:A612").EntireRow.Delete
End If


If Range("H580").Value = "PALLET:  3 OF 0" Then
Range("A577:A594").EntireRow.Delete
End If


If Range("H562").Value = "PALLET:  3 OF 0" Then
Range("A559:A576").EntireRow.Delete
End If


If Range("H544").Value = "PALLET:  3 OF 0" Then
Range("A541:A558").EntireRow.Delete
End If


If Range("H526").Value = "PALLET:  3 OF 0" Then
Range("A523:A540").EntireRow.Delete
End If


If Range("H508").Value = "PALLET:  3 OF 0" Then
Range("A505:A522").EntireRow.Delete
End If


If Range("H490").Value = "PALLET:  3 OF 0" Then
Range("A487:A504").EntireRow.Delete
End If


If Range("H472").Value = "PALLET:  3 OF 0" Then
Range("A469:A486").EntireRow.Delete
End If


If Range("H454").Value = "PALLET:  3 OF 0" Then
Range("A451:A468").EntireRow.Delete
End If


If Range("H436").Value = "PALLET:  3 OF 0" Then
Range("A433:A450").EntireRow.Delete
End If


If Range("H418").Value = "PALLET:  3 OF 0" Then
Range("A415:A432").EntireRow.Delete
End If


If Range("H400").Value = "PALLET:  3 OF 0" Then
Range("A397:A414").EntireRow.Delete
End If


If Range("H382").Value = "PALLET:  3 OF 0" Then
Range("A379:A396").EntireRow.Delete
End If


If Range("H364").Value = "PALLET:  3 OF 0" Then
Range("A361:A378").EntireRow.Delete
End If


If Range("H346").Value = "PALLET:  3 OF 0" Then
Range("A343:A360").EntireRow.Delete
End If


If Range("H328").Value = "PALLET:  3 OF 0" Then
Range("A325:A342").EntireRow.Delete
End If


If Range("H310").Value = "PALLET:  3 OF 0" Then
Range("A307:A324").EntireRow.Delete
End If


If Range("H292").Value = "PALLET:  3 OF 0" Then
Range("A289:A306").EntireRow.Delete
End If


If Range("H274").Value = "PALLET:  3 OF 0" Then
Range("A271:A288").EntireRow.Delete
End If


If Range("H256").Value = "PALLET:  3 OF 0" Then
Range("A253:A270").EntireRow.Delete
End If


If Range("H238").Value = "PALLET:  3 OF 0" Then
Range("A235:A252").EntireRow.Delete
End If


If Range("H220").Value = "PALLET:  3 OF 0" Then
Range("A217:A234").EntireRow.Delete
End If


If Range("H202").Value = "PALLET:  3 OF 0" Then
Range("A199:A216").EntireRow.Delete
End If


If Range("H184").Value = "PALLET:  3 OF 0" Then
Range("A181:A198").EntireRow.Delete
End If


If Range("H166").Value = "PALLET:  3 OF 0" Then
Range("A163:A180").EntireRow.Delete
End If


If Range("H148").Value = "PALLET:  3 OF 0" Then
Range("A145:A162").EntireRow.Delete
End If


If Range("H130").Value = "PALLET:  3 OF 0" Then
Range("A127:A144").EntireRow.Delete
End If


If Range("H112").Value = "PALLET:  3 OF 0" Then
Range("A109:A126").EntireRow.Delete
End If


If Range("H94").Value = "PALLET:  3 OF 0" Then
Range("A91:A108").EntireRow.Delete
End If


If Range("H76").Value = "PALLET:  3 OF 0" Then
Range("A73:A90").EntireRow.Delete
End If


If Range("H58").Value = "PALLET:  3 OF 0" Then
Range("A55:A72").EntireRow.Delete
End If


If Range("H40").Value = "PALLET:  3 OF 0" Then
Range("A37:A54").EntireRow.Delete
End If


If Range("H22").Value = "PALLET:  3 OF 0" Then
Range("A19:A36").EntireRow.Delete
End If


If Range("H4").Value = "PALLET:  3 OF 0" Then
Range("A1:A18").EntireRow.Delete
End If
    
End Sub

Module 2:

Code:
Sub CaseCount_DeleteBlankPages2()

If Range("H2254").Value = "PALLET:  2 OF 1" Then
Range("A2251:A2268").EntireRow.Delete
End If


If Range("H2236").Value = "PALLET:  2 OF 1" Then
Range("A2233:A2250").EntireRow.Delete
End If


If Range("H2218").Value = "PALLET:  2 OF 1" Then
Range("A2215:A2232").EntireRow.Delete
End If


If Range("H2200").Value = "PALLET:  2 OF 1" Then
Range("A2197:A2214").EntireRow.Delete
End If


If Range("H2182").Value = "PALLET:  2 OF 1" Then
Range("A2179:A2196").EntireRow.Delete
End If


If Range("H2164").Value = "PALLET:  2 OF 1" Then
Range("A2161:A2178").EntireRow.Delete
End If


If Range("H2146").Value = "PALLET:  2 OF 1" Then
Range("A2143:A2160").EntireRow.Delete
End If


If Range("H2128").Value = "PALLET:  2 OF 1" Then
Range("A2125:A2142").EntireRow.Delete
End If


If Range("H2110").Value = "PALLET:  2 OF 1" Then
Range("A2107:A2124").EntireRow.Delete
End If


If Range("H2092").Value = "PALLET:  2 OF 1" Then
Range("A2089:A2106").EntireRow.Delete
End If


If Range("H2074").Value = "PALLET:  2 OF 1" Then
Range("A2071:A2088").EntireRow.Delete
End If


If Range("H2056").Value = "PALLET:  2 OF 1" Then
Range("A2053:A2070").EntireRow.Delete
End If


If Range("H2038").Value = "PALLET:  2 OF 1" Then
Range("A2035:A2052").EntireRow.Delete
End If


If Range("H2020").Value = "PALLET:  2 OF 1" Then
Range("A2017:A2034").EntireRow.Delete
End If


If Range("H2002").Value = "PALLET:  2 OF 1" Then
Range("A1999:A2016").EntireRow.Delete
End If


If Range("H1984").Value = "PALLET:  2 OF 1" Then
Range("A1981:A1998").EntireRow.Delete
End If


If Range("H1966").Value = "PALLET:  2 OF 1" Then
Range("A1963:A1980").EntireRow.Delete
End If


If Range("H1948").Value = "PALLET:  2 OF 1" Then
Range("A1945:A1962").EntireRow.Delete
End If


If Range("H1930").Value = "PALLET:  2 OF 1" Then
Range("A1927:A1944").EntireRow.Delete
End If


If Range("H1912").Value = "PALLET:  2 OF 1" Then
Range("A1909:A1926").EntireRow.Delete
End If


If Range("H1894").Value = "PALLET:  2 OF 1" Then
Range("A1891:A1908").EntireRow.Delete
End If


If Range("H1876").Value = "PALLET:  2 OF 1" Then
Range("A1873:A1890").EntireRow.Delete
End If


If Range("H1858").Value = "PALLET:  2 OF 1" Then
Range("A1855:A1872").EntireRow.Delete
End If


If Range("H1840").Value = "PALLET:  2 OF 1" Then
Range("A1837:A1854").EntireRow.Delete
End If


If Range("H1822").Value = "PALLET:  2 OF 1" Then
Range("A1819:A1836").EntireRow.Delete
End If


If Range("H1804").Value = "PALLET:  2 OF 1" Then
Range("A1801:A1818").EntireRow.Delete
End If


If Range("H1786").Value = "PALLET:  2 OF 1" Then
Range("A1783:A1800").EntireRow.Delete
End If


If Range("H1768").Value = "PALLET:  2 OF 1" Then
Range("A1765:A1782").EntireRow.Delete
End If


If Range("H1750").Value = "PALLET:  2 OF 1" Then
Range("A1747:A1764").EntireRow.Delete
End If


If Range("H1732").Value = "PALLET:  2 OF 1" Then
Range("A1729:A1746").EntireRow.Delete
End If


If Range("H1714").Value = "PALLET:  2 OF 1" Then
Range("A1711:A1728").EntireRow.Delete
End If


If Range("H1696").Value = "PALLET:  2 OF 1" Then
Range("A1693:A1710").EntireRow.Delete
End If


If Range("H1678").Value = "PALLET:  2 OF 1" Then
Range("A1675:A1692").EntireRow.Delete
End If


If Range("H1660").Value = "PALLET:  2 OF 1" Then
Range("A1657:A1674").EntireRow.Delete
End If


If Range("H1642").Value = "PALLET:  2 OF 1" Then
Range("A1639:A1656").EntireRow.Delete
End If


If Range("H1624").Value = "PALLET:  2 OF 1" Then
Range("A1621:A1638").EntireRow.Delete
End If


If Range("H1606").Value = "PALLET:  2 OF 1" Then
Range("A1603:A1620").EntireRow.Delete
End If


If Range("H1588").Value = "PALLET:  2 OF 1" Then
Range("A1585:A1602").EntireRow.Delete
End If


If Range("H1570").Value = "PALLET:  2 OF 1" Then
Range("A1567:A1584").EntireRow.Delete
End If


If Range("H1552").Value = "PALLET:  2 OF 1" Then
Range("A1549:A1566").EntireRow.Delete
End If


If Range("H1534").Value = "PALLET:  2 OF 1" Then
Range("A1531:A1548").EntireRow.Delete
End If


If Range("H1516").Value = "PALLET:  2 OF 1" Then
Range("A1513:A1530").EntireRow.Delete
End If


If Range("H1498").Value = "PALLET:  2 OF 1" Then
Range("A1495:A1512").EntireRow.Delete
End If


If Range("H1480").Value = "PALLET:  2 OF 1" Then
Range("A1477:A1494").EntireRow.Delete
End If


If Range("H1462").Value = "PALLET:  2 OF 1" Then
Range("A1459:A1476").EntireRow.Delete
End If


If Range("H1444").Value = "PALLET:  2 OF 1" Then
Range("A1441:A1458").EntireRow.Delete
End If


If Range("H1426").Value = "PALLET:  2 OF 1" Then
Range("A1423:A1440").EntireRow.Delete
End If


If Range("H1408").Value = "PALLET:  2 OF 1" Then
Range("A1405:A1422").EntireRow.Delete
End If


If Range("H1390").Value = "PALLET:  2 OF 1" Then
Range("A1387:A1404").EntireRow.Delete
End If


If Range("H1372").Value = "PALLET:  2 OF 1" Then
Range("A1369:A1386").EntireRow.Delete
End If


If Range("H1354").Value = "PALLET:  2 OF 1" Then
Range("A1351:A1368").EntireRow.Delete
End If


If Range("H1336").Value = "PALLET:  2 OF 1" Then
Range("A1333:A1350").EntireRow.Delete
End If


If Range("H1318").Value = "PALLET:  2 OF 1" Then
Range("A1315:A1332").EntireRow.Delete
End If


If Range("H1300").Value = "PALLET:  2 OF 1" Then
Range("A1297:A1314").EntireRow.Delete
End If


If Range("H1282").Value = "PALLET:  2 OF 1" Then
Range("A1279:A1296").EntireRow.Delete
End If


If Range("H1264").Value = "PALLET:  2 OF 1" Then
Range("A1261:A1278").EntireRow.Delete
End If


If Range("H1246").Value = "PALLET:  2 OF 1" Then
Range("A1243:A1260").EntireRow.Delete
End If


If Range("H1228").Value = "PALLET:  2 OF 1" Then
Range("A1225:A1242").EntireRow.Delete
End If


If Range("H1210").Value = "PALLET:  2 OF 1" Then
Range("A1207:A1224").EntireRow.Delete
End If


If Range("H1192").Value = "PALLET:  2 OF 1" Then
Range("A1189:A1206").EntireRow.Delete
End If


If Range("H1174").Value = "PALLET:  2 OF 1" Then
Range("A1171:A1188").EntireRow.Delete
End If


If Range("H1156").Value = "PALLET:  2 OF 1" Then
Range("A1153:A1170").EntireRow.Delete
End If


If Range("H1138").Value = "PALLET:  2 OF 1" Then
Range("A1135:A1152").EntireRow.Delete
End If


If Range("H1120").Value = "PALLET:  2 OF 1" Then
Range("A1117:A1134").EntireRow.Delete
End If


If Range("H1102").Value = "PALLET:  2 OF 1" Then
Range("A1099:A1116").EntireRow.Delete
End If


If Range("H1084").Value = "PALLET:  2 OF 1" Then
Range("A1081:A1098").EntireRow.Delete
End If


If Range("H1066").Value = "PALLET:  2 OF 1" Then
Range("A1063:A1080").EntireRow.Delete
End If


If Range("H1048").Value = "PALLET:  2 OF 1" Then
Range("A1045:A1062").EntireRow.Delete
End If


If Range("H1030").Value = "PALLET:  2 OF 1" Then
Range("A1027:A1044").EntireRow.Delete
End If


If Range("H1012").Value = "PALLET:  2 OF 1" Then
Range("A1009:A1026").EntireRow.Delete
End If


If Range("H994").Value = "PALLET:  2 OF 1" Then
Range("A991:A1008").EntireRow.Delete
End If


If Range("H976").Value = "PALLET:  2 OF 1" Then
Range("A973:A990").EntireRow.Delete
End If


If Range("H958").Value = "PALLET:  2 OF 1" Then
Range("A955:A972").EntireRow.Delete
End If


If Range("H940").Value = "PALLET:  2 OF 1" Then
Range("A937:A954").EntireRow.Delete
End If


If Range("H922").Value = "PALLET:  2 OF 1" Then
Range("A919:A936").EntireRow.Delete
End If


If Range("H904").Value = "PALLET:  2 OF 1" Then
Range("A901:A918").EntireRow.Delete
End If


If Range("H886").Value = "PALLET:  2 OF 1" Then
Range("A883:A900").EntireRow.Delete
End If


If Range("H868").Value = "PALLET:  2 OF 1" Then
Range("A865:A882").EntireRow.Delete
End If


If Range("H850").Value = "PALLET:  2 OF 1" Then
Range("A847:A864").EntireRow.Delete
End If


If Range("H832").Value = "PALLET:  2 OF 1" Then
Range("A829:A846").EntireRow.Delete
End If


If Range("H814").Value = "PALLET:  2 OF 1" Then
Range("A811:A828").EntireRow.Delete
End If


If Range("H796").Value = "PALLET:  2 OF 1" Then
Range("A793:A810").EntireRow.Delete
End If


If Range("H778").Value = "PALLET:  2 OF 1" Then
Range("A775:A792").EntireRow.Delete
End If


If Range("H760").Value = "PALLET:  2 OF 1" Then
Range("A757:A774").EntireRow.Delete
End If


If Range("H742").Value = "PALLET:  2 OF 1" Then
Range("A739:A756").EntireRow.Delete
End If


If Range("H724").Value = "PALLET:  2 OF 1" Then
Range("A721:A738").EntireRow.Delete
End If


If Range("H706").Value = "PALLET:  2 OF 1" Then
Range("A703:A720").EntireRow.Delete
End If


If Range("H688").Value = "PALLET:  2 OF 1" Then
Range("A685:A702").EntireRow.Delete
End If


If Range("H670").Value = "PALLET:  2 OF 1" Then
Range("A667:A684").EntireRow.Delete
End If


If Range("H652").Value = "PALLET:  2 OF 1" Then
Range("A649:A666").EntireRow.Delete
End If


If Range("H634").Value = "PALLET:  2 OF 1" Then
Range("A631:A648").EntireRow.Delete
End If


If Range("H616").Value = "PALLET:  2 OF 1" Then
Range("A613:A630").EntireRow.Delete
End If


If Range("H598").Value = "PALLET:  2 OF 1" Then
Range("A595:A612").EntireRow.Delete
End If


If Range("H580").Value = "PALLET:  2 OF 1" Then
Range("A577:A594").EntireRow.Delete
End If


If Range("H562").Value = "PALLET:  2 OF 1" Then
Range("A559:A576").EntireRow.Delete
End If


If Range("H544").Value = "PALLET:  2 OF 1" Then
Range("A541:A558").EntireRow.Delete
End If


If Range("H526").Value = "PALLET:  2 OF 1" Then
Range("A523:A540").EntireRow.Delete
End If


If Range("H508").Value = "PALLET:  2 OF 1" Then
Range("A505:A522").EntireRow.Delete
End If


If Range("H490").Value = "PALLET:  2 OF 1" Then
Range("A487:A504").EntireRow.Delete
End If


If Range("H472").Value = "PALLET:  2 OF 1" Then
Range("A469:A486").EntireRow.Delete
End If


If Range("H454").Value = "PALLET:  2 OF 1" Then
Range("A451:A468").EntireRow.Delete
End If


If Range("H436").Value = "PALLET:  2 OF 1" Then
Range("A433:A450").EntireRow.Delete
End If


If Range("H418").Value = "PALLET:  2 OF 1" Then
Range("A415:A432").EntireRow.Delete
End If


If Range("H400").Value = "PALLET:  2 OF 1" Then
Range("A397:A414").EntireRow.Delete
End If


If Range("H382").Value = "PALLET:  2 OF 1" Then
Range("A379:A396").EntireRow.Delete
End If


If Range("H364").Value = "PALLET:  2 OF 1" Then
Range("A361:A378").EntireRow.Delete
End If


If Range("H346").Value = "PALLET:  2 OF 1" Then
Range("A343:A360").EntireRow.Delete
End If


If Range("H328").Value = "PALLET:  2 OF 1" Then
Range("A325:A342").EntireRow.Delete
End If


If Range("H310").Value = "PALLET:  2 OF 1" Then
Range("A307:A324").EntireRow.Delete
End If


If Range("H292").Value = "PALLET:  2 OF 1" Then
Range("A289:A306").EntireRow.Delete
End If


If Range("H274").Value = "PALLET:  2 OF 1" Then
Range("A271:A288").EntireRow.Delete
End If


If Range("H256").Value = "PALLET:  2 OF 1" Then
Range("A253:A270").EntireRow.Delete
End If


If Range("H238").Value = "PALLET:  2 OF 1" Then
Range("A235:A252").EntireRow.Delete
End If


If Range("H220").Value = "PALLET:  2 OF 1" Then
Range("A217:A234").EntireRow.Delete
End If


If Range("H202").Value = "PALLET:  2 OF 1" Then
Range("A199:A216").EntireRow.Delete
End If


If Range("H184").Value = "PALLET:  2 OF 1" Then
Range("A181:A198").EntireRow.Delete
End If


If Range("H166").Value = "PALLET:  2 OF 1" Then
Range("A163:A180").EntireRow.Delete
End If


If Range("H148").Value = "PALLET:  2 OF 1" Then
Range("A145:A162").EntireRow.Delete
End If


If Range("H130").Value = "PALLET:  2 OF 1" Then
Range("A127:A144").EntireRow.Delete
End If


If Range("H112").Value = "PALLET:  2 OF 1" Then
Range("A109:A126").EntireRow.Delete
End If


If Range("H94").Value = "PALLET:  2 OF 1" Then
Range("A91:A108").EntireRow.Delete
End If


If Range("H76").Value = "PALLET:  2 OF 1" Then
Range("A73:A90").EntireRow.Delete
End If


If Range("H58").Value = "PALLET:  2 OF 1" Then
Range("A55:A72").EntireRow.Delete
End If


If Range("H40").Value = "PALLET:  2 OF 1" Then
Range("A37:A54").EntireRow.Delete
End If


If Range("H22").Value = "PALLET:  2 OF 1" Then
Range("A19:A36").EntireRow.Delete
End If


If Range("H4").Value = "PALLET:  2 OF 1" Then
Range("A1:A18").EntireRow.Delete
End If


If Range("H2254").Value = "PALLET:  3 OF 1" Then
Range("A2251:A2268").EntireRow.Delete
End If
    
If Range("H2236").Value = "PALLET:  3 OF 1" Then
Range("A2233:A2250").EntireRow.Delete
End If
    
If Range("H2218").Value = "PALLET:  3 OF 1" Then
Range("A2215:A2232").EntireRow.Delete
End If
    
If Range("H2200").Value = "PALLET:  3 OF 1" Then
Range("A2197:A2214").EntireRow.Delete
End If
    
If Range("H2182").Value = "PALLET:  3 OF 1" Then
Range("A2179:A2196").EntireRow.Delete
End If
    
If Range("H2164").Value = "PALLET:  3 OF 1" Then
Range("A2161:A2178").EntireRow.Delete
End If
    
If Range("H2146").Value = "PALLET:  3 OF 1" Then
Range("A2143:A2160").EntireRow.Delete
End If
    
If Range("H2128").Value = "PALLET:  3 OF 1" Then
Range("A2125:A2142").EntireRow.Delete
End If
    
If Range("H2110").Value = "PALLET:  3 OF 1" Then
Range("A2107:A2124").EntireRow.Delete
End If
    
If Range("H2092").Value = "PALLET:  3 OF 1" Then
Range("A2089:A2106").EntireRow.Delete
End If
    
If Range("H2074").Value = "PALLET:  3 OF 1" Then
Range("A2071:A2088").EntireRow.Delete
End If
    
If Range("H2056").Value = "PALLET:  3 OF 1" Then
Range("A2053:A2070").EntireRow.Delete
End If
    
If Range("H2038").Value = "PALLET:  3 OF 1" Then
Range("A2035:A2052").EntireRow.Delete
End If
    
If Range("H2020").Value = "PALLET:  3 OF 1" Then
Range("A2017:A2034").EntireRow.Delete
End If
    
If Range("H2002").Value = "PALLET:  3 OF 1" Then
Range("A1999:A2016").EntireRow.Delete
End If
    
If Range("H1984").Value = "PALLET:  3 OF 1" Then
Range("A1981:A1998").EntireRow.Delete
End If
    
If Range("H1966").Value = "PALLET:  3 OF 1" Then
Range("A1963:A1980").EntireRow.Delete
End If
    
If Range("H1948").Value = "PALLET:  3 OF 1" Then
Range("A1945:A1962").EntireRow.Delete
End If
    
If Range("H1930").Value = "PALLET:  3 OF 1" Then
Range("A1927:A1944").EntireRow.Delete
End If
    
If Range("H1912").Value = "PALLET:  3 OF 1" Then
Range("A1909:A1926").EntireRow.Delete
End If
    
If Range("H1894").Value = "PALLET:  3 OF 1" Then
Range("A1891:A1908").EntireRow.Delete
End If
    
If Range("H1876").Value = "PALLET:  3 OF 1" Then
Range("A1873:A1890").EntireRow.Delete
End If
    
If Range("H1858").Value = "PALLET:  3 OF 1" Then
Range("A1855:A1872").EntireRow.Delete
End If
    
If Range("H1840").Value = "PALLET:  3 OF 1" Then
Range("A1837:A1854").EntireRow.Delete
End If
    
If Range("H1822").Value = "PALLET:  3 OF 1" Then
Range("A1819:A1836").EntireRow.Delete
End If
    
If Range("H1804").Value = "PALLET:  3 OF 1" Then
Range("A1801:A1818").EntireRow.Delete
End If
    
If Range("H1786").Value = "PALLET:  3 OF 1" Then
Range("A1783:A1800").EntireRow.Delete
End If
    
If Range("H1768").Value = "PALLET:  3 OF 1" Then
Range("A1765:A1782").EntireRow.Delete
End If
    
If Range("H1750").Value = "PALLET:  3 OF 1" Then
Range("A1747:A1764").EntireRow.Delete
End If
    
If Range("H1732").Value = "PALLET:  3 OF 1" Then
Range("A1729:A1746").EntireRow.Delete
End If
    
If Range("H1714").Value = "PALLET:  3 OF 1" Then
Range("A1711:A1728").EntireRow.Delete
End If
    
If Range("H1696").Value = "PALLET:  3 OF 1" Then
Range("A1693:A1710").EntireRow.Delete
End If
    
If Range("H1678").Value = "PALLET:  3 OF 1" Then
Range("A1675:A1692").EntireRow.Delete
End If
    
If Range("H1660").Value = "PALLET:  3 OF 1" Then
Range("A1657:A1674").EntireRow.Delete
End If
    
If Range("H1642").Value = "PALLET:  3 OF 1" Then
Range("A1639:A1656").EntireRow.Delete
End If
    
If Range("H1624").Value = "PALLET:  3 OF 1" Then
Range("A1621:A1638").EntireRow.Delete
End If
    
If Range("H1606").Value = "PALLET:  3 OF 1" Then
Range("A1603:A1620").EntireRow.Delete
End If
    
If Range("H1588").Value = "PALLET:  3 OF 1" Then
Range("A1585:A1602").EntireRow.Delete
End If
    
If Range("H1570").Value = "PALLET:  3 OF 1" Then
Range("A1567:A1584").EntireRow.Delete
End If
    
If Range("H1552").Value = "PALLET:  3 OF 1" Then
Range("A1549:A1566").EntireRow.Delete
End If
    
If Range("H1534").Value = "PALLET:  3 OF 1" Then
Range("A1531:A1548").EntireRow.Delete
End If
    
If Range("H1516").Value = "PALLET:  3 OF 1" Then
Range("A1513:A1530").EntireRow.Delete
End If
    
If Range("H1498").Value = "PALLET:  3 OF 1" Then
Range("A1495:A1512").EntireRow.Delete
End If
    
If Range("H1480").Value = "PALLET:  3 OF 1" Then
Range("A1477:A1494").EntireRow.Delete
End If
    
If Range("H1462").Value = "PALLET:  3 OF 1" Then
Range("A1459:A1476").EntireRow.Delete
End If
    
If Range("H1444").Value = "PALLET:  3 OF 1" Then
Range("A1441:A1458").EntireRow.Delete
End If
    
If Range("H1426").Value = "PALLET:  3 OF 1" Then
Range("A1423:A1440").EntireRow.Delete
End If
    
If Range("H1408").Value = "PALLET:  3 OF 1" Then
Range("A1405:A1422").EntireRow.Delete
End If
    
If Range("H1390").Value = "PALLET:  3 OF 1" Then
Range("A1387:A1404").EntireRow.Delete
End If
    
If Range("H1372").Value = "PALLET:  3 OF 1" Then
Range("A1369:A1386").EntireRow.Delete
End If
    
If Range("H1354").Value = "PALLET:  3 OF 1" Then
Range("A1351:A1368").EntireRow.Delete
End If
    
If Range("H1336").Value = "PALLET:  3 OF 1" Then
Range("A1333:A1350").EntireRow.Delete
End If
    
If Range("H1318").Value = "PALLET:  3 OF 1" Then
Range("A1315:A1332").EntireRow.Delete
End If
    
If Range("H1300").Value = "PALLET:  3 OF 1" Then
Range("A1297:A1314").EntireRow.Delete
End If
    
If Range("H1282").Value = "PALLET:  3 OF 1" Then
Range("A1279:A1296").EntireRow.Delete
End If
    
If Range("H1264").Value = "PALLET:  3 OF 1" Then
Range("A1261:A1278").EntireRow.Delete
End If
    
If Range("H1246").Value = "PALLET:  3 OF 1" Then
Range("A1243:A1260").EntireRow.Delete
End If
    
If Range("H1228").Value = "PALLET:  3 OF 1" Then
Range("A1225:A1242").EntireRow.Delete
End If
    
If Range("H1210").Value = "PALLET:  3 OF 1" Then
Range("A1207:A1224").EntireRow.Delete
End If
    
If Range("H1192").Value = "PALLET:  3 OF 1" Then
Range("A1189:A1206").EntireRow.Delete
End If
    
If Range("H1174").Value = "PALLET:  3 OF 1" Then
Range("A1171:A1188").EntireRow.Delete
End If
    
If Range("H1156").Value = "PALLET:  3 OF 1" Then
Range("A1153:A1170").EntireRow.Delete
End If
    
If Range("H1138").Value = "PALLET:  3 OF 1" Then
Range("A1135:A1152").EntireRow.Delete
End If
    
If Range("H1120").Value = "PALLET:  3 OF 1" Then
Range("A1117:A1134").EntireRow.Delete
End If
    
If Range("H1102").Value = "PALLET:  3 OF 1" Then
Range("A1099:A1116").EntireRow.Delete
End If
    
If Range("H1084").Value = "PALLET:  3 OF 1" Then
Range("A1081:A1098").EntireRow.Delete
End If
    
If Range("H1066").Value = "PALLET:  3 OF 1" Then
Range("A1063:A1080").EntireRow.Delete
End If
    
If Range("H1048").Value = "PALLET:  3 OF 1" Then
Range("A1045:A1062").EntireRow.Delete
End If
    
If Range("H1030").Value = "PALLET:  3 OF 1" Then
Range("A1027:A1044").EntireRow.Delete
End If
    
If Range("H1012").Value = "PALLET:  3 OF 1" Then
Range("A1009:A1026").EntireRow.Delete
End If
    
If Range("H994").Value = "PALLET:  3 OF 1" Then
Range("A991:A1008").EntireRow.Delete
End If
    
If Range("H976").Value = "PALLET:  3 OF 1" Then
Range("A973:A990").EntireRow.Delete
End If
    
If Range("H958").Value = "PALLET:  3 OF 1" Then
Range("A955:A972").EntireRow.Delete
End If
    
If Range("H940").Value = "PALLET:  3 OF 1" Then
Range("A937:A954").EntireRow.Delete
End If
    
If Range("H922").Value = "PALLET:  3 OF 1" Then
Range("A919:A936").EntireRow.Delete
End If
    
If Range("H904").Value = "PALLET:  3 OF 1" Then
Range("A901:A918").EntireRow.Delete
End If
    
If Range("H886").Value = "PALLET:  3 OF 1" Then
Range("A883:A900").EntireRow.Delete
End If
    
If Range("H868").Value = "PALLET:  3 OF 1" Then
Range("A865:A882").EntireRow.Delete
End If
    
If Range("H850").Value = "PALLET:  3 OF 1" Then
Range("A847:A864").EntireRow.Delete
End If
    
If Range("H832").Value = "PALLET:  3 OF 1" Then
Range("A829:A846").EntireRow.Delete
End If
    
If Range("H814").Value = "PALLET:  3 OF 1" Then
Range("A811:A828").EntireRow.Delete
End If
    
If Range("H796").Value = "PALLET:  3 OF 1" Then
Range("A793:A810").EntireRow.Delete
End If
    
If Range("H778").Value = "PALLET:  3 OF 1" Then
Range("A775:A792").EntireRow.Delete
End If
    
If Range("H760").Value = "PALLET:  3 OF 1" Then
Range("A757:A774").EntireRow.Delete
End If
    
If Range("H742").Value = "PALLET:  3 OF 1" Then
Range("A739:A756").EntireRow.Delete
End If
    
If Range("H724").Value = "PALLET:  3 OF 1" Then
Range("A721:A738").EntireRow.Delete
End If
    
If Range("H706").Value = "PALLET:  3 OF 1" Then
Range("A703:A720").EntireRow.Delete
End If
    
If Range("H688").Value = "PALLET:  3 OF 1" Then
Range("A685:A702").EntireRow.Delete
End If
    
If Range("H670").Value = "PALLET:  3 OF 1" Then
Range("A667:A684").EntireRow.Delete
End If
    
If Range("H652").Value = "PALLET:  3 OF 1" Then
Range("A649:A666").EntireRow.Delete
End If
    
If Range("H634").Value = "PALLET:  3 OF 1" Then
Range("A631:A648").EntireRow.Delete
End If
    
If Range("H616").Value = "PALLET:  3 OF 1" Then
Range("A613:A630").EntireRow.Delete
End If
    
If Range("H598").Value = "PALLET:  3 OF 1" Then
Range("A595:A612").EntireRow.Delete
End If
    
If Range("H580").Value = "PALLET:  3 OF 1" Then
Range("A577:A594").EntireRow.Delete
End If
    
If Range("H562").Value = "PALLET:  3 OF 1" Then
Range("A559:A576").EntireRow.Delete
End If
    
If Range("H544").Value = "PALLET:  3 OF 1" Then
Range("A541:A558").EntireRow.Delete
End If
    
If Range("H526").Value = "PALLET:  3 OF 1" Then
Range("A523:A540").EntireRow.Delete
End If
    
If Range("H508").Value = "PALLET:  3 OF 1" Then
Range("A505:A522").EntireRow.Delete
End If
    
If Range("H490").Value = "PALLET:  3 OF 1" Then
Range("A487:A504").EntireRow.Delete
End If
    
If Range("H472").Value = "PALLET:  3 OF 1" Then
Range("A469:A486").EntireRow.Delete
End If
    
If Range("H454").Value = "PALLET:  3 OF 1" Then
Range("A451:A468").EntireRow.Delete
End If
    
If Range("H436").Value = "PALLET:  3 OF 1" Then
Range("A433:A450").EntireRow.Delete
End If
    
If Range("H418").Value = "PALLET:  3 OF 1" Then
Range("A415:A432").EntireRow.Delete
End If
    
If Range("H400").Value = "PALLET:  3 OF 1" Then
Range("A397:A414").EntireRow.Delete
End If
    
If Range("H382").Value = "PALLET:  3 OF 1" Then
Range("A379:A396").EntireRow.Delete
End If
    
If Range("H364").Value = "PALLET:  3 OF 1" Then
Range("A361:A378").EntireRow.Delete
End If
    
If Range("H346").Value = "PALLET:  3 OF 1" Then
Range("A343:A360").EntireRow.Delete
End If
    
If Range("H328").Value = "PALLET:  3 OF 1" Then
Range("A325:A342").EntireRow.Delete
End If
    
If Range("H310").Value = "PALLET:  3 OF 1" Then
Range("A307:A324").EntireRow.Delete
End If
    
If Range("H292").Value = "PALLET:  3 OF 1" Then
Range("A289:A306").EntireRow.Delete
End If
    
If Range("H274").Value = "PALLET:  3 OF 1" Then
Range("A271:A288").EntireRow.Delete
End If
    
If Range("H256").Value = "PALLET:  3 OF 1" Then
Range("A253:A270").EntireRow.Delete
End If
    
If Range("H238").Value = "PALLET:  3 OF 1" Then
Range("A235:A252").EntireRow.Delete
End If
    
If Range("H220").Value = "PALLET:  3 OF 1" Then
Range("A217:A234").EntireRow.Delete
End If
    
If Range("H202").Value = "PALLET:  3 OF 1" Then
Range("A199:A216").EntireRow.Delete
End If
    
If Range("H184").Value = "PALLET:  3 OF 1" Then
Range("A181:A198").EntireRow.Delete
End If
    
If Range("H166").Value = "PALLET:  3 OF 1" Then
Range("A163:A180").EntireRow.Delete
End If
    
If Range("H148").Value = "PALLET:  3 OF 1" Then
Range("A145:A162").EntireRow.Delete
End If
    
If Range("H130").Value = "PALLET:  3 OF 1" Then
Range("A127:A144").EntireRow.Delete
End If
    
If Range("H112").Value = "PALLET:  3 OF 1" Then
Range("A109:A126").EntireRow.Delete
End If
    
If Range("H94").Value = "PALLET:  3 OF 1" Then
Range("A91:A108").EntireRow.Delete
End If
    
If Range("H76").Value = "PALLET:  3 OF 1" Then
Range("A73:A90").EntireRow.Delete
End If
    
If Range("H58").Value = "PALLET:  3 OF 1" Then
Range("A55:A72").EntireRow.Delete
End If
    
If Range("H40").Value = "PALLET:  3 OF 1" Then
Range("A37:A54").EntireRow.Delete
End If
    
If Range("H22").Value = "PALLET:  3 OF 1" Then
Range("A19:A36").EntireRow.Delete
End If
    
If Range("H4").Value = "PALLET:  3 OF 1" Then
Range("A1:A18").EntireRow.Delete
End If
    
If Range("H2254").Value = "PALLET:  3 OF 2" Then
Range("A2251:A2268").EntireRow.Delete
End If
    
If Range("H2236").Value = "PALLET:  3 OF 2" Then
Range("A2233:A2250").EntireRow.Delete
End If
    
If Range("H2218").Value = "PALLET:  3 OF 2" Then
Range("A2215:A2232").EntireRow.Delete
End If
    
If Range("H2200").Value = "PALLET:  3 OF 2" Then
Range("A2197:A2214").EntireRow.Delete
End If
    
If Range("H2182").Value = "PALLET:  3 OF 2" Then
Range("A2179:A2196").EntireRow.Delete
End If
    
If Range("H2164").Value = "PALLET:  3 OF 2" Then
Range("A2161:A2178").EntireRow.Delete
End If
    
If Range("H2146").Value = "PALLET:  3 OF 2" Then
Range("A2143:A2160").EntireRow.Delete
End If
    
If Range("H2128").Value = "PALLET:  3 OF 2" Then
Range("A2125:A2142").EntireRow.Delete
End If
    
If Range("H2110").Value = "PALLET:  3 OF 2" Then
Range("A2107:A2124").EntireRow.Delete
End If
    
If Range("H2092").Value = "PALLET:  3 OF 2" Then
Range("A2089:A2106").EntireRow.Delete
End If
    
If Range("H2074").Value = "PALLET:  3 OF 2" Then
Range("A2071:A2088").EntireRow.Delete
End If
    
If Range("H2056").Value = "PALLET:  3 OF 2" Then
Range("A2053:A2070").EntireRow.Delete
End If
    
If Range("H2038").Value = "PALLET:  3 OF 2" Then
Range("A2035:A2052").EntireRow.Delete
End If
    
If Range("H2020").Value = "PALLET:  3 OF 2" Then
Range("A2017:A2034").EntireRow.Delete
End If
    
If Range("H2002").Value = "PALLET:  3 OF 2" Then
Range("A1999:A2016").EntireRow.Delete
End If
    
If Range("H1984").Value = "PALLET:  3 OF 2" Then
Range("A1981:A1998").EntireRow.Delete
End If
    
If Range("H1966").Value = "PALLET:  3 OF 2" Then
Range("A1963:A1980").EntireRow.Delete
End If
    
If Range("H1948").Value = "PALLET:  3 OF 2" Then
Range("A1945:A1962").EntireRow.Delete
End If
    
If Range("H1930").Value = "PALLET:  3 OF 2" Then
Range("A1927:A1944").EntireRow.Delete
End If
    
If Range("H1912").Value = "PALLET:  3 OF 2" Then
Range("A1909:A1926").EntireRow.Delete
End If
    
If Range("H1894").Value = "PALLET:  3 OF 2" Then
Range("A1891:A1908").EntireRow.Delete
End If
    
If Range("H1876").Value = "PALLET:  3 OF 2" Then
Range("A1873:A1890").EntireRow.Delete
End If
    
If Range("H1858").Value = "PALLET:  3 OF 2" Then
Range("A1855:A1872").EntireRow.Delete
End If
    
If Range("H1840").Value = "PALLET:  3 OF 2" Then
Range("A1837:A1854").EntireRow.Delete
End If
    
If Range("H1822").Value = "PALLET:  3 OF 2" Then
Range("A1819:A1836").EntireRow.Delete
End If
    
If Range("H1804").Value = "PALLET:  3 OF 2" Then
Range("A1801:A1818").EntireRow.Delete
End If
    
If Range("H1786").Value = "PALLET:  3 OF 2" Then
Range("A1783:A1800").EntireRow.Delete
End If
    
If Range("H1768").Value = "PALLET:  3 OF 2" Then
Range("A1765:A1782").EntireRow.Delete
End If
    
If Range("H1750").Value = "PALLET:  3 OF 2" Then
Range("A1747:A1764").EntireRow.Delete
End If
    
If Range("H1732").Value = "PALLET:  3 OF 2" Then
Range("A1729:A1746").EntireRow.Delete
End If
    
If Range("H1714").Value = "PALLET:  3 OF 2" Then
Range("A1711:A1728").EntireRow.Delete
End If
    
If Range("H1696").Value = "PALLET:  3 OF 2" Then
Range("A1693:A1710").EntireRow.Delete
End If
    
If Range("H1678").Value = "PALLET:  3 OF 2" Then
Range("A1675:A1692").EntireRow.Delete
End If
    
If Range("H1660").Value = "PALLET:  3 OF 2" Then
Range("A1657:A1674").EntireRow.Delete
End If
    
If Range("H1642").Value = "PALLET:  3 OF 2" Then
Range("A1639:A1656").EntireRow.Delete
End If
    
If Range("H1624").Value = "PALLET:  3 OF 2" Then
Range("A1621:A1638").EntireRow.Delete
End If
    
If Range("H1606").Value = "PALLET:  3 OF 2" Then
Range("A1603:A1620").EntireRow.Delete
End If
    
If Range("H1588").Value = "PALLET:  3 OF 2" Then
Range("A1585:A1602").EntireRow.Delete
End If
    
If Range("H1570").Value = "PALLET:  3 OF 2" Then
Range("A1567:A1584").EntireRow.Delete
End If
    
If Range("H1552").Value = "PALLET:  3 OF 2" Then
Range("A1549:A1566").EntireRow.Delete
End If
    
If Range("H1534").Value = "PALLET:  3 OF 2" Then
Range("A1531:A1548").EntireRow.Delete
End If
    
If Range("H1516").Value = "PALLET:  3 OF 2" Then
Range("A1513:A1530").EntireRow.Delete
End If
    
If Range("H1498").Value = "PALLET:  3 OF 2" Then
Range("A1495:A1512").EntireRow.Delete
End If
    
If Range("H1480").Value = "PALLET:  3 OF 2" Then
Range("A1477:A1494").EntireRow.Delete
End If
    
If Range("H1462").Value = "PALLET:  3 OF 2" Then
Range("A1459:A1476").EntireRow.Delete
End If
    
If Range("H1444").Value = "PALLET:  3 OF 2" Then
Range("A1441:A1458").EntireRow.Delete
End If
    
If Range("H1426").Value = "PALLET:  3 OF 2" Then
Range("A1423:A1440").EntireRow.Delete
End If
    
If Range("H1408").Value = "PALLET:  3 OF 2" Then
Range("A1405:A1422").EntireRow.Delete
End If
    
If Range("H1390").Value = "PALLET:  3 OF 2" Then
Range("A1387:A1404").EntireRow.Delete
End If
    
If Range("H1372").Value = "PALLET:  3 OF 2" Then
Range("A1369:A1386").EntireRow.Delete
End If
    
If Range("H1354").Value = "PALLET:  3 OF 2" Then
Range("A1351:A1368").EntireRow.Delete
End If
    
If Range("H1336").Value = "PALLET:  3 OF 2" Then
Range("A1333:A1350").EntireRow.Delete
End If
    
If Range("H1318").Value = "PALLET:  3 OF 2" Then
Range("A1315:A1332").EntireRow.Delete
End If
    
If Range("H1300").Value = "PALLET:  3 OF 2" Then
Range("A1297:A1314").EntireRow.Delete
End If
    
If Range("H1282").Value = "PALLET:  3 OF 2" Then
Range("A1279:A1296").EntireRow.Delete
End If
    
If Range("H1264").Value = "PALLET:  3 OF 2" Then
Range("A1261:A1278").EntireRow.Delete
End If
    
If Range("H1246").Value = "PALLET:  3 OF 2" Then
Range("A1243:A1260").EntireRow.Delete
End If
    
If Range("H1228").Value = "PALLET:  3 OF 2" Then
Range("A1225:A1242").EntireRow.Delete
End If
    
If Range("H1210").Value = "PALLET:  3 OF 2" Then
Range("A1207:A1224").EntireRow.Delete
End If
    
If Range("H1192").Value = "PALLET:  3 OF 2" Then
Range("A1189:A1206").EntireRow.Delete
End If
    
If Range("H1174").Value = "PALLET:  3 OF 2" Then
Range("A1171:A1188").EntireRow.Delete
End If
    
If Range("H1156").Value = "PALLET:  3 OF 2" Then
Range("A1153:A1170").EntireRow.Delete
End If
    
If Range("H1138").Value = "PALLET:  3 OF 2" Then
Range("A1135:A1152").EntireRow.Delete
End If
    
If Range("H1120").Value = "PALLET:  3 OF 2" Then
Range("A1117:A1134").EntireRow.Delete
End If
    
If Range("H1102").Value = "PALLET:  3 OF 2" Then
Range("A1099:A1116").EntireRow.Delete
End If
    
If Range("H1084").Value = "PALLET:  3 OF 2" Then
Range("A1081:A1098").EntireRow.Delete
End If
    
If Range("H1066").Value = "PALLET:  3 OF 2" Then
Range("A1063:A1080").EntireRow.Delete
End If
    
If Range("H1048").Value = "PALLET:  3 OF 2" Then
Range("A1045:A1062").EntireRow.Delete
End If
    
If Range("H1030").Value = "PALLET:  3 OF 2" Then
Range("A1027:A1044").EntireRow.Delete
End If
    
If Range("H1012").Value = "PALLET:  3 OF 2" Then
Range("A1009:A1026").EntireRow.Delete
End If
    
If Range("H994").Value = "PALLET:  3 OF 2" Then
Range("A991:A1008").EntireRow.Delete
End If
    
If Range("H976").Value = "PALLET:  3 OF 2" Then
Range("A973:A990").EntireRow.Delete
End If
    
If Range("H958").Value = "PALLET:  3 OF 2" Then
Range("A955:A972").EntireRow.Delete
End If
    
If Range("H940").Value = "PALLET:  3 OF 2" Then
Range("A937:A954").EntireRow.Delete
End If
    
If Range("H922").Value = "PALLET:  3 OF 2" Then
Range("A919:A936").EntireRow.Delete
End If
    
If Range("H904").Value = "PALLET:  3 OF 2" Then
Range("A901:A918").EntireRow.Delete
End If
    
If Range("H886").Value = "PALLET:  3 OF 2" Then
Range("A883:A900").EntireRow.Delete
End If
    
If Range("H868").Value = "PALLET:  3 OF 2" Then
Range("A865:A882").EntireRow.Delete
End If
    
If Range("H850").Value = "PALLET:  3 OF 2" Then
Range("A847:A864").EntireRow.Delete
End If
    
If Range("H832").Value = "PALLET:  3 OF 2" Then
Range("A829:A846").EntireRow.Delete
End If
    
If Range("H814").Value = "PALLET:  3 OF 2" Then
Range("A811:A828").EntireRow.Delete
End If
    
If Range("H796").Value = "PALLET:  3 OF 2" Then
Range("A793:A810").EntireRow.Delete
End If
    
If Range("H778").Value = "PALLET:  3 OF 2" Then
Range("A775:A792").EntireRow.Delete
End If
    
If Range("H760").Value = "PALLET:  3 OF 2" Then
Range("A757:A774").EntireRow.Delete
End If
    
If Range("H742").Value = "PALLET:  3 OF 2" Then
Range("A739:A756").EntireRow.Delete
End If
    
If Range("H724").Value = "PALLET:  3 OF 2" Then
Range("A721:A738").EntireRow.Delete
End If
    
If Range("H706").Value = "PALLET:  3 OF 2" Then
Range("A703:A720").EntireRow.Delete
End If
    
If Range("H688").Value = "PALLET:  3 OF 2" Then
Range("A685:A702").EntireRow.Delete
End If
    
If Range("H670").Value = "PALLET:  3 OF 2" Then
Range("A667:A684").EntireRow.Delete
End If
    
If Range("H652").Value = "PALLET:  3 OF 2" Then
Range("A649:A666").EntireRow.Delete
End If
    
If Range("H634").Value = "PALLET:  3 OF 2" Then
Range("A631:A648").EntireRow.Delete
End If
    
If Range("H616").Value = "PALLET:  3 OF 2" Then
Range("A613:A630").EntireRow.Delete
End If
    
If Range("H598").Value = "PALLET:  3 OF 2" Then
Range("A595:A612").EntireRow.Delete
End If
    
If Range("H580").Value = "PALLET:  3 OF 2" Then
Range("A577:A594").EntireRow.Delete
End If
    
If Range("H562").Value = "PALLET:  3 OF 2" Then
Range("A559:A576").EntireRow.Delete
End If
    
If Range("H544").Value = "PALLET:  3 OF 2" Then
Range("A541:A558").EntireRow.Delete
End If
    
If Range("H526").Value = "PALLET:  3 OF 2" Then
Range("A523:A540").EntireRow.Delete
End If
    
If Range("H508").Value = "PALLET:  3 OF 2" Then
Range("A505:A522").EntireRow.Delete
End If
    
If Range("H490").Value = "PALLET:  3 OF 2" Then
Range("A487:A504").EntireRow.Delete
End If
    
If Range("H472").Value = "PALLET:  3 OF 2" Then
Range("A469:A486").EntireRow.Delete
End If
    
If Range("H454").Value = "PALLET:  3 OF 2" Then
Range("A451:A468").EntireRow.Delete
End If
    
If Range("H436").Value = "PALLET:  3 OF 2" Then
Range("A433:A450").EntireRow.Delete
End If
    
If Range("H418").Value = "PALLET:  3 OF 2" Then
Range("A415:A432").EntireRow.Delete
End If
    
If Range("H400").Value = "PALLET:  3 OF 2" Then
Range("A397:A414").EntireRow.Delete
End If
    
If Range("H382").Value = "PALLET:  3 OF 2" Then
Range("A379:A396").EntireRow.Delete
End If
    
If Range("H364").Value = "PALLET:  3 OF 2" Then
Range("A361:A378").EntireRow.Delete
End If
    
If Range("H346").Value = "PALLET:  3 OF 2" Then
Range("A343:A360").EntireRow.Delete
End If
    
If Range("H328").Value = "PALLET:  3 OF 2" Then
Range("A325:A342").EntireRow.Delete
End If
    
If Range("H310").Value = "PALLET:  3 OF 2" Then
Range("A307:A324").EntireRow.Delete
End If
    
If Range("H292").Value = "PALLET:  3 OF 2" Then
Range("A289:A306").EntireRow.Delete
End If
    
If Range("H274").Value = "PALLET:  3 OF 2" Then
Range("A271:A288").EntireRow.Delete
End If
    
If Range("H256").Value = "PALLET:  3 OF 2" Then
Range("A253:A270").EntireRow.Delete
End If
    
If Range("H238").Value = "PALLET:  3 OF 2" Then
Range("A235:A252").EntireRow.Delete
End If
    
If Range("H220").Value = "PALLET:  3 OF 2" Then
Range("A217:A234").EntireRow.Delete
End If
    
If Range("H202").Value = "PALLET:  3 OF 2" Then
Range("A199:A216").EntireRow.Delete
End If
    
If Range("H184").Value = "PALLET:  3 OF 2" Then
Range("A181:A198").EntireRow.Delete
End If
    
If Range("H166").Value = "PALLET:  3 OF 2" Then
Range("A163:A180").EntireRow.Delete
End If
    
If Range("H148").Value = "PALLET:  3 OF 2" Then
Range("A145:A162").EntireRow.Delete
End If
    
If Range("H130").Value = "PALLET:  3 OF 2" Then
Range("A127:A144").EntireRow.Delete
End If
    
If Range("H112").Value = "PALLET:  3 OF 2" Then
Range("A109:A126").EntireRow.Delete
End If
    
If Range("H94").Value = "PALLET:  3 OF 2" Then
Range("A91:A108").EntireRow.Delete
End If
    
If Range("H76").Value = "PALLET:  3 OF 2" Then
Range("A73:A90").EntireRow.Delete
End If
    
If Range("H58").Value = "PALLET:  3 OF 2" Then
Range("A55:A72").EntireRow.Delete
End If
    
If Range("H40").Value = "PALLET:  3 OF 2" Then
Range("A37:A54").EntireRow.Delete
End If
    
If Range("H22").Value = "PALLET:  3 OF 2" Then
Range("A19:A36").EntireRow.Delete
End If
    
If Range("H4").Value = "PALLET:  3 OF 2" Then
Range("A1:A18").EntireRow.Delete
End If


End Sub
 
Upvote 0
Try this :-
Lightly tested !!!
Code:
[COLOR="Navy"]Sub[/COLOR] MG28Jun12
[COLOR="Navy"]Dim[/COLOR] Dic [COLOR="Navy"]As[/COLOR] Object, n [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long[/COLOR]
[COLOR="Navy"]Set[/COLOR] Dic = CreateObject("scripting.dictionary")
 Dic("PALLET:  1 OF 0") = Empty
 Dic("Pallet:  2 of 0") = Empty
 Dic("Pallet:  3 of 0") = Empty
 Dic("Pallet:  2 of 1") = Empty
 Dic("Pallet:  3 of 1") = Empty
 Dic("Pallet:  3 of 2") = Empty
[COLOR="Navy"]For[/COLOR] n = 2254 To 4 [COLOR="Navy"]Step[/COLOR] -18
 [COLOR="Navy"]If[/COLOR] Dic.exists(Range("H" & n).Value) [COLOR="Navy"]Then[/COLOR]
       Range("A" & n).Offset(-3).Resize(18).EntireRow.Delete
 [COLOR="Navy"]End[/COLOR] If
[COLOR="Navy"]Next[/COLOR] n
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Regards Mick
 
Upvote 0
Try this :-
Lightly tested !!!
Code:
[COLOR=Navy]Sub[/COLOR] MG28Jun12
[COLOR=Navy]Dim[/COLOR] Dic [COLOR=Navy]As[/COLOR] Object, n [COLOR=Navy]As[/COLOR] [COLOR=Navy]Long[/COLOR]
[COLOR=Navy]Set[/COLOR] Dic = CreateObject("scripting.dictionary")
 Dic("PALLET:  1 OF 0") = Empty
 Dic("Pallet:  2 of 0") = Empty
 Dic("Pallet:  3 of 0") = Empty
 Dic("Pallet:  2 of 1") = Empty
 Dic("Pallet:  3 of 1") = Empty
 Dic("Pallet:  3 of 2") = Empty
[COLOR=Navy]For[/COLOR] n = 2254 To 4 [COLOR=Navy]Step[/COLOR] -18
 [COLOR=Navy]If[/COLOR] Dic.exists(Range("H" & n).Value) [COLOR=Navy]Then[/COLOR]
       Range("A" & n).Offset(-3).Resize(18).EntireRow.Delete
 [COLOR=Navy]End[/COLOR] If
[COLOR=Navy]Next[/COLOR] n
[COLOR=Navy]End[/COLOR] [COLOR=Navy]Sub[/COLOR]
Regards Mick


Thank you Mick! I can't seem to get it to work but I so appreciate your time spent on this!! It runs and then nothing changes... I have something that works it is just ugly! Thank you so much!
 
Upvote 0
Try this:-
I forgot to reflect the "Case" sensitivity.
Code:
[COLOR="Navy"]Sub[/COLOR] MG02Jul20
[COLOR="Navy"]Dim[/COLOR] Dic [COLOR="Navy"]As[/COLOR] Object, n [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long,[/COLOR] K [COLOR="Navy"]As[/COLOR] Variant
[COLOR="Navy"]Set[/COLOR] Dic = CreateObject("scripting.dictionary")
Dic("PALLET:  1 OF 0") = Empty
Dic("PALLET:  2 OF 0") = Empty
Dic("PALLET:  3 OF 0") = Empty
Dic("PALLET:  2 OF 1") = Empty
Dic("PALLET:  3 OF 1") = Empty
Dic("PALLET:  3 OF 2") = Empty

[COLOR="Navy"]For[/COLOR] n = 2254 To 4 [COLOR="Navy"]Step[/COLOR] -18
 [COLOR="Navy"]If[/COLOR] Dic.exists(Range("H" & n).Value) [COLOR="Navy"]Then[/COLOR]
       Range("A" & n).Offset(-3).Resize(18).EntireRow.Delete
 [COLOR="Navy"]End[/COLOR] If
[COLOR="Navy"]Next[/COLOR] n

[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Regards Mick
 
Upvote 0
Try this:-
I forgot to reflect the "Case" sensitivity.
Code:
[COLOR=Navy]Sub[/COLOR] MG02Jul20
[COLOR=Navy]Dim[/COLOR] Dic [COLOR=Navy]As[/COLOR] Object, n [COLOR=Navy]As[/COLOR] [COLOR=Navy]Long,[/COLOR] K [COLOR=Navy]As[/COLOR] Variant
[COLOR=Navy]Set[/COLOR] Dic = CreateObject("scripting.dictionary")
Dic("PALLET:  1 OF 0") = Empty
Dic("PALLET:  2 OF 0") = Empty
Dic("PALLET:  3 OF 0") = Empty
Dic("PALLET:  2 OF 1") = Empty
Dic("PALLET:  3 OF 1") = Empty
Dic("PALLET:  3 OF 2") = Empty

[COLOR=Navy]For[/COLOR] n = 2254 To 4 [COLOR=Navy]Step[/COLOR] -18
 [COLOR=Navy]If[/COLOR] Dic.exists(Range("H" & n).Value) [COLOR=Navy]Then[/COLOR]
       Range("A" & n).Offset(-3).Resize(18).EntireRow.Delete
 [COLOR=Navy]End[/COLOR] If
[COLOR=Navy]Next[/COLOR] n

[COLOR=Navy]End[/COLOR] [COLOR=Navy]Sub[/COLOR]
Regards Mick


Hey MickG!! Thank you so much! Worked great! Sorry it took me so long to reply. I have been busy and hadn't had a chance to work on this workbook.

By the way, if I wanted to adapt this to other workbooks with similar needs but different formatting, how might I do that? I tried switching the obvious items but it didn't work. So, I must be missing something important. The next workbook has the "Pallet: 1 of #" in column H. I need the row above, the row it is in and the 25 rows following to be deleted in this case. Maybe you could just tell me which items are vital to change and I'll know how to do it for the many workbooks I will need this for? I am so appreciative of your help!
 
Upvote 0
By the way, here's what I changed it to to try to make it work. Maybe something will stick out to you? Also, the data for this one goes to row 3240. And I added more criteria.

Code:
Sub MG02Jul20()
Dim Dic As Object, n As Long, K As Variant
Set Dic = CreateObject("scripting.dictionary")
Dic("PALLET: 1 OF 0") = Empty
Dic("PALLET: 2 OF 0") = Empty
Dic("PALLET: 3 OF 0") = Empty
Dic("PALLET: 4 OF 0") = Empty
Dic("PALLET: 5 OF 0") = Empty
Dic("PALLET: 6 OF 0") = Empty
Dic("PALLET: 2 OF 1") = Empty
Dic("PALLET: 3 OF 1") = Empty
Dic("PALLET: 4 OF 1") = Empty
Dic("PALLET: 5 OF 1") = Empty
Dic("PALLET: 6 OF 1") = Empty
Dic("PALLET: 3 OF 2") = Empty
Dic("PALLET: 4 OF 2") = Empty
Dic("PALLET: 5 OF 2") = Empty
Dic("PALLET: 6 OF 2") = Empty
Dic("PALLET: 4 OF 3") = Empty
Dic("PALLET: 5 OF 3") = Empty
Dic("PALLET: 6 OF 3") = Empty
Dic("PALLET: 5 OF 4") = Empty
Dic("PALLET: 6 OF 4") = Empty
Dic("PALLET: 6 OF 5") = Empty


For n = 3240 To 2 Step -28
 If Dic.exists(Range("H" & n).Value) Then
       Range("A" & n).Offset(-2).Resize(28).EntireRow.Delete
 End If
Next n


End Sub
 
Last edited:
Upvote 0
Should it be :-
Code:
For n = 3240 To 2 Step -[COLOR="#FF0000"][/COLOR][B]27[/B]
 If Dic.exists(Range("H" & n).Value) Then
       Range("A" & n).Offset[B](-1[/B][COLOR="#FF0000"][/COLOR][B][/B]).Resize([COLOR="#FF0000"][/COLOR][B]27[/B]).EntireRow.Delete
 End If
Next n
 
Last edited:
Upvote 0
Should it be :-
Code:
For n = 3240 To 2 Step -[B]27[/B]
 If Dic.exists(Range("H" & n).Value) Then
       Range("A" & n).Offset[B](-1[/B]).Resize([B]27[/B]).EntireRow.Delete
 End If
Next n

Thank you for responding! I switched that. Just a quick blink and nothing is different. Hmmmm. I can't think of what is wrong...
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top