mercredi 13 juin 2018

Excel - Identify a value in one sheet vs values in another with different ranges

I need some help with an excel formula or format that can help me with the following:

TABLE 1

(Row) |(a) ID | (b)FROM | (c) TO | (d) VALUE 
(1)      123       0        1          50
(2)      123       1        2          50
(3)      123       3        4          50
(4)      123       4        5          60
(5)      123       5        6          60

TABLE 2

(Row) |(a) ID | (b)FROM | (c) TO | (d) VALUE 
(1)      123       0        3          50
(2)      123       4        6          60

So table one has been incremented to 1 (from and to) whereas table two contains ranges with the values. The incremented values in table 1 should equal the values in table two if the range in table one falls within the range from table 2.

OUTPUT

 (Row) |(a) ID | (b)FROM | (c) TO | (d) VALUE 
(1)      123       0        1          50          TRUE
(2)      123       1        2          50          TRUE 
(3)      123       3        4          50          TRUE
(4)      123       4        5          60          TRUE
(5)      123       5        6          60          TRUE

Basically ID'123' has a value of 50 for the increments from 0 to 3 and value of 60 for the increments from 4 – 6 and as per TABLE 2 0-3 = 50 and 4-6 = 60 therefore the statement should be TRUE.

    =IF(AND(A1=table2!a:a, table1!B1>=table2!b:b,table1!a1<table!B:B),IF(table1!d2=table2!d:d, TRUE,FALSE))

It might be with the way excel deals with ranges etc?

Aucun commentaire:

Enregistrer un commentaire