#### ItalianPlatinum

##### Well-known Member

- Joined
- Mar 23, 2017

- Messages
- 686

- Office Version
- 2021
- 2019
- 2016
- 2010
- 2007

- Platform
- Windows

Doesn't Work - shows wrong formula result

VBA Code:

```
With Sheets("Calculation")
lr = .Cells(rows.count, "C").End(xlUp).row
.Range("A3:A" & lr).Formula = "=D3&E3&G3"
.Range("B3:B" & lr).Formula = "=IF(ISNA(VLOOKUP(A3,'AS'!$A$2:$A$10000,1,FALSE)), ""No"", ""Yes"")"
.Range("A3:B" & lr).Value = .Range("A3:B" & lr).Value
.Range("2:2").AutoFilter
```

Works - shows correct formula result

VBA Code:

```
With Sheets("Calculation")
lr = .Cells(rows.count, "C").End(xlUp).row
.Range("A3:A" & lr).Formula = "=D3&E3&G3"
.Range("B3:B" & lr).Formula = "=IF(ISNA(VLOOKUP(A3,'AS'!$A$2:$A$10000,1,FALSE)), ""No"", ""Yes"")"
.Range("A3:A" & lr).Value = .Range("A3:A" & lr).Value
.Range("B3:B" & lr).Value = .Range("B3:B" & lr).Value
.Range("2:2").AutoFilter
```

Works - shows correct formula result

VBA Code:

```
With Sheets("Calculation")
lr = .Cells(rows.count, "C").End(xlUp).row
.Range("A3:A" & lr).Formula = "=D3&E3&G3"
.Range("B3:B" & lr).Formula = "=IF(ISNA(VLOOKUP(A3,'AS'!$A$2:$A$10000,1,FALSE)), ""No"", ""Yes"")"
.Range("2:2").AutoFilter
```