+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Valued Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    623

    Transfer Values Based On Condition & Insert Date : PT B

    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
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    623

    Re: Transfer Values Based On Condition & Insert Date : PT B

    Sure would appreciate it if someone could please take a look at this, this
    morning. - Thanks

  3. #3
    Valued Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    623

    Re: Transfer Values Based On Condition & Insert Date : PT B

    Maybe something like this?
    Code doesn't error but doesn't give results either. why?

    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
    I've attached another example with the inserted code.
    Try running Sub LoadEquivalentTrial()


    Any help to get this working is welcome.

    Thanks

    BDB
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0