lundi 13 juin 2016

If (stmt) > False > Eval next row

I am trying to populate a table with SKU codes from another sheet in my workbook. I need to use an if statement that cycles through a column and passes over a value if it evaluates false. Essentially, I want to populate a second table with SKUS but absolutely NO blank SKUS - this is where the cycling comes in.

In Table 1 (T1), col A contains the line number that the SKUs run on. Col B of T1 contains the SKU code. T1 is not sorted and never will be so there are many different arrangements of lines and SKUs. T2 is set up the exact same way: col A is the lines and col B is the SKUs; however T2 is only concerned with lines 51 and 56. So, I need to populate the SKUs into col B of T2 by checking to see if col A of T2 matches col A of T1, if they match then I want col B of T1 to populate col B of T2 (only one cell not whole column), but if they don't match I don't want to populate 0 or a false SKU, I want the formula to keep checking down col A of T1.

I cannot find a way to do this non-macro and I need to avoid macros because the workbook will be passed down to people without knowledge to preserve/modify macros.

Following is my thought process: =IF(A1 of T2 is found in col A of T1, B1 of T2 = B(row# of matching col A cell), skip to next row and evaluate all records in col A T1)

Aucun commentaire:

Enregistrer un commentaire