# reverse lookup

#### lmcd5666

##### New Member
Hi all,

Hope someone can help.
Situation:
.....A.....B......C......D
1....0.....1......400....0
2....0.....2......300....0
3....0.....3......350....0
4....0.....4......150...150
5....2.....0.......0.....0
6....3.....0.......0.....0
7....1.....0.......0.....0

I need a formula that make values in column D match the value in column C (same row) but only if the value in column B(same row)
is NOT find in column A range. Values in column A are not in any order. Values in column B are in ascending order. If there is a match then the value in column is zero.

As you can see from the above example..D4 equals c4 because there was no matching of B4 in the column A range. The first three row...there are matches, so the values in the D's cells are zero.

Any help would be greatly appreciated.

Toan

### Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use \$ signs: \$V\$2:\$Z\$99 will always point to V2:Z99, even after copying

#### Asala42

##### Well-known Member
Situation:
.....A.....B......C......D
1....0.....1......400....0
2....0.....2......300....0
3....0.....3......350....0
4....0.....4......150...150
5....2.....0.......0.....0
6....3.....0.......0.....0
7....1.....0.......0.....0

I need a formula that make values in column D match the value in column C (same row) but only if the value in column B(same row)
is NOT find in column A range. Values in column A are not in any order. Values in column B are in ascending order. If there is a match then the value in column is zero.

As you can see from the above example..D4 equals c4 because there was no matching of B4 in the column A range. The first three row...there are matches, so the values in the D's cells are zero.

Try:
=IF(Countif(\$A\$2:\$A\$10,B2)>0,0,D2)

#### lmcd5666

##### New Member
Thank you, Asala42. It worked out great.

Replies
13
Views
288
Replies
10
Views
329
Replies
12
Views
332
Replies
1
Views
114
Replies
2
Views
148

1,147,498
Messages
5,741,505
Members
423,663
Latest member
kaveh87rsh

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back