View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Brady Brady is offline
external usenet poster
 
Posts: 10
Default Cell value not recognized by code.

Ian,

I tried the ElseIf code below and its a no go also. It simply
"skips" the "not inventory" cells completely and leaves the "PULL/BUY"
cell empty. It does go ahead and perform the the PULL/BUY fills so, I
am one step ahead (many thanks).

I just can't figure out why it cannot recognize the "not inventory".
I checked the formatting of the cell thinking maybe that was it. The
formatting of the part number is Custom in this fashion ###-##-###.
Thus, a number of 55511222 is "diced" up nicely. However, "not
inventory" can't be formatted like that. Could that in some way be
causing my problem? AHHHHHHHHH!!!!!!!!!!!!!!!!!!!!

Lost.

On Dec 19, 4:18 pm, "Ian" wrote:
Not tested, but try this. I'm not sure if you can use OR in this way, so an
alternative would be as follows

'Populate Pull/Buy Cells
Needed = Cells(RowNum, ColN5) - Cells(RowNum, ColN4)
If Needed < Cells(RowNum, ColN6) * 0.9 Then
Cells(RowNum, ColN7).Value = "Buy"
ElseIf Cells(RowNumMin, ColPN).Value = "not inventory" Then
Cells(RowNum, ColN7).Value = "Buy"
Else
Cells(RowNum, ColN7).Value = "Pull"
End If

--
Ian