Hi all,
I've been trying to put together some code that will create an history of inventory which is in stock and items on order. Based on a set of conditional statements, the values should move from designated columns left to right. So far all my attempts have not given me the correct results.
The transfer of values is based on two factors :Date and Qty of values
For In Stock Qty Values, Values will transfer if The input QTY's are <>
from most recent QTY if the Date is < Current Date.
For In Stock Qty Values, Values will transfer if The input QTY's are >
from most recent QTY if the Date is = Current Date.
For On Order Qty Values, Values will transfer if The input QTY's are <>
from most recent QTY & if the Date is = Current Date (happens within same day).
For On Order Qty Values, Values will transfer for Change in Order Qty.
if The input QTY's are > from most recent QTY & the Date is <=> Current Date.
If anyone could take a look at the code and see what needs to be fix,
I'd greatly appreciate it. As I've been working of this for way too long of a
time and still have not got it right
To run/evaluate please run :LoadTransfer()
- Thanks
BDB
Sure would appreciate it if someone could please take a look at this, this
morning. - Thanks
Maybe something like this?
Code doesn't error but doesn't give results either. why?
I've attached another example with the inserted code.Code:Sub LoadEquivalentTrial() Dim OutPL As Worksheet Set OutPL = Sheets("Sheet2") Dim OutIY As Worksheet Set OutIY = Sheets("Sheet1") Set fso = CreateObject("Scripting.filesystemobject") OutPL.Activate OutIY.Activate ThisWorkbook.Activate 'ActiveSheet.ListObjects("List1").Unlist For i = 10 To Cells(Rows.Count, 1).End(xlUp).Row Set findit = OutIY.Range("A:A").Find(what:=Cells(i, 1).Value) If OutIY.Cells(i, "D").Value = OutIY.Cells(i, "F").Value Then If (Int(Cells(i, "G").Value = (today))) Then Cells(findit.Row, "G") = (today()) And Cells(i, "F").Value = Cells(i, "D").Value 'compares the two most recently acquired qty values found in Incode for any value change 'Adds date to values which change for current qty. ' If value changes, value moves to current column (F) 'End If Next i 'End If MsgBox "Done" End Sub
Try running Sub LoadEquivalentTrial()
Any help to get this working is welcome.
Thanks
BDB
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks