Trying to write a VBA script to capture the value in cell J2 each time we open the file, I would want to record the value in J2 in the rows below and maybe also record the date in the "I" column next to that value. Each time the file is opened it refreshes. I only got to the very first part of the VBA code, haven't found anything else on the web to help finish it off if its possible.
VBA Code:
Private Sub Workbook_Open()
Range("J3") = Range("J2").Value
End Sub
Order_Line_Fill_Rate.xlsx | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
1 | ItemCode | ItemCodeDesc | WarehouseCode | QuantityOrdered | QuantityBackordered | UDF_QTY_PULLED | UDF_INVENTORIED_ITEM | Total Lines | BO Lines | Line Fill % | ||
2 | 1332L | 1332L TIG WELDING GLOVE CUT RE | 000 | 48 | 0 | 0 | Y | 1498 | 330 | 78% | ||
3 | 1332L | 1332L TIG WELDING GLOVE CUT RE | 000 | 84 | 0 | 84 | Y | |||||
4 | 10019063-GRAY-XLR | MNS FR SLD VENT LS WRK SHRT SI | 000 | 5 | 0 | 5 | Y | |||||
5 | CDKW038-NAVYBLUE | 20 oz. Viking Nova Tumbler | 000 | 48 | 48 | 0 | Y | |||||
6 | 10022599-GRAY-LGR | MNS FR AIR HENLEY LS TOP SILVR | 000 | 3 | 0 | 3 | Y | |||||
7 | 10012552-BLUE-3230 | MNS FR M4 RLX BSC BOOT CUT JEA | 000 | 3 | 0 | 3 | Y | |||||
8 | 10012552-BLUE-4032 | MNS FR M4 RLX BSC BOOT CUT JEA | 000 | 5 | 0 | 5 | Y | |||||
9 | 10019063-GRAY-XXLR | MNS FR SLD VENT LS WRK SHRT SI | 000 | 5 | 0 | 5 | Y | |||||
10 | SHE01-5000-ICE GREY-3XL | Gildan Heavy Cotton T-Shirt LE | 000 | 5 | 0 | 5 | Y | |||||
11 | FQD810-10 | QUATRO DIELECTRIC REGULAR BOOT | 000 | 1 | 0 | 1 | Y | |||||
12 | SHENHK01-G2XL-V3XL-R3XL | SHELTON NEW HIRE KIT GLOVE 2XL | 000 | 1 | 0 | 1 | Y | |||||
13 | FR44-YELLOW-3XL | Sealtex Flame FR Hi-Vis 50in C | 000 | 1 | 0 | 1 | Y | |||||
Order_Fill_Rate |
Cell Formulas | ||
---|---|---|
Range | Formula | |
H2 | H2 | =COUNTA(A:A) |
I2 | I2 | =COUNTIF(E:E,"> 0") |
J2 | J2 | =ABS((I2-H2)/H2) |
Named Ranges | ||
---|---|---|
Name | Refers To | Cells |
ExternalData_1 | =Order_Fill_Rate!$A$1:$G$1498 | H2 |