I have two sheets in Excel. Sheet2 has all the output data table from a data base source. I have been trying to code a VBA that can transfer specific data records from sheet2 to sheet1. I have tried to develop a criteria that can make data from a specific column in sheet2 to be transferred automatically to sheet1 in a specific cell if the row data for specific records of around 4 field columns, matches up with the main column record that has the data to be transferred.
For example I have series of data in sheet 2 as below
LIMIT SALES REGION LOCATION ITEM
422234 4768.24 HR 1 BUIL
343222 190.73 BP 2 CON
432220 1494.62 OP 1 EQ
343332 1302.66 BP 1 AR
433322 3881.67 BP 1 NO
The criteria is, sales record for item BUIL can only show on a specific cell in sheet1 if the row in sheet2 shows- Region "OP", location "2". Same rule will apply for the limit record to show in sheet1. Sheet1 has limit and sales as columns and items as rows.
BUIL
there will only ever be one record with regionHR
and location1
? – Alex P