Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This code stores a value for each number (which is a location) tha
starts with ICE. That prevents PACK fron using the same location numbe later in the code. I now have a third category "QA". I can't figure ou how to stop PACK from using the same location numbers as QA. Any hel greatly appreciated i = 125 For Each Row In Rows("10:325") cnt = 0 For Each CELL In Row.Columns("K:DB") If CELL.Value = "QAPK" Then CELL.Value = "QA" & CStr(i) cnt = cnt + 1 End If Next CELL If cnt 0 Then i = i + 2 If i 135 Then i = 125 End If Next Row i = 100 For Each Row In Rows("10:325") cnt = 0 For Each CELL In Row.Columns("K:DB") If CELL.Value = "ICE" Then ReDim Preserve arr(UBound(arr) + 1) arr(UBound(arr)) = i CELL.Value = "IC" & CStr(i) cnt = cnt + 1 End If Next CELL If cnt 0 Then i = i + 2 If i 144 Then i = 100 End If Next Row i = 100 For Each Row In Rows("10:325") cnt = 0 For Each CELL In Row.Columns("K:DB") If CELL.Value = "PACK" Then ReDim Preserve arr(UBound(arr) + 1) arr(UBound(arr)) = i found = 0 On Error Resume Next found = WorksheetFunction.Match(i, arr, 0) If found Then i = i + 1 CELL.Value = "PK" & CStr(i) cnt = cnt + 1 End If Next CELL If cnt 0 Then i = i + 1 If i = 146 Then i = 100 End If Next Ro -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Lookup within a 2 dimensional array | Excel Worksheet Functions | |||
Three Dimensional Array Question | Excel Discussion (Misc queries) | |||
add to two dimensional array | Excel Programming | |||
2 Dimensional Array | Excel Programming | |||
2 Dimensional Array | Excel Programming |