An excel `IF`

formula has the following construction:

```
IF( <condition> , <value if condition true> , <value if condition false> )
```

Immediately your formula has two big problems:

- No false clause.
- The true clause is a conditional, not a value.

What you need is another column, with an if statement that says (in pseudo!):

```
IF (NEW!E2 equal OLD!H2) THEN (set this cell to OLD!A2)
ELSE (set this cell to NEW!B2)
```

Or, in Excel:

```
IF( NEW!E2=OLD!H2 , OLD!A2 , NEW!B2 )
```

Obviously, you then end up with two ID columns on your sheet. But, once you're done you should be able to copy/paste-special-values this extra column over the real one.

## Update

Depending on how your data is structured this *might* be useless anyway.

It could be better to replace the `if`

's condition with some form of lookup, so you get (in pseudo!):

```
IF( [NEW!E2] is in OLD list ) THEN (set this cell to ID of matching entry)
ELSE (set this cell to NEW!B2)
```

Or, in Excel (line breaks so it fits!):

```
IF( VLOOKUP(NEW!E2,OLD!A1:G1000,1) = NEW!E2 ,
VLOOKUP(NEW!E2,OLD!A1:G1000,2) ,
NEW!B2)
```

Obviously, I've made up `OLD!A1:G1000`

so you'd have to provide your real table dimensions, and you would need to change the matching column number (the last value in `VLOOKUP`

), and make sure the data in `OLD`

is sorted by the email address, *and* refactor `OLD`

so the email address is the first column (`VLOOKUP`

requires ascending order and only looks in the first column for data - then returns the data from the same row in the requested column).

## Update2:

I think I mis-read your question slightly, because what you ask for is a column of *just* the matching old values - in which case you don't need a false clause because when there isn't a match you want "nothing". In which case you can just use `""`

as a "do nothing" false clause to get blank cells.