Welcome to the Excel Forum

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Please Register to Remove these Ads

Please Register to Remove these Ads



Reply
  #1  
Old 06-26-2009, 04:05 PM
bdb1974 bdb1974 is offline
Valued Forum Contributor
 
Join Date: 10 Dec 2008
Location: Austin
Posts: 413
bdb1974 is becoming part of the community
Transfer Values Based On Condition & Insert Date : PT B

Please Register to Remove these Ads

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
File Type: xls TestTransfer.xls (40.5 KB, 3 views)
Reply With Quote
  #2  
Old 06-29-2009, 09:46 AM
bdb1974 bdb1974 is offline
Valued Forum Contributor
 
Join Date: 10 Dec 2008
Location: Austin
Posts: 413
bdb1974 is becoming part of the community
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
Reply With Quote
  #3  
Old 06-30-2009, 06:11 PM
bdb1974 bdb1974 is offline
Valued Forum Contributor
 
Join Date: 10 Dec 2008
Location: Austin
Posts: 413
bdb1974 is becoming part of the community
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
File Type: xls TestTransfer2.xls (50.5 KB, 3 views)
Reply With Quote


Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump