# Convert formula to vba

#### jvoss

##### Board Regular
Good day,
Looking to see if this can be turned into vba, revise the forumla to speed up the save & recalculation. i have wb with 21000 row spreed sheets and it is using this formula. this is slowing down to a crawl when trying to add new data or even saving.

{=IFERROR(INDEX(MASTER_LIST!\$T\$2:\$T\$10000,MATCH(\$C4,IF(MASTER_LIST!\$M\$2:\$M\$10000=\$D4,IF(MASTER_LIST!\$N\$2:\$N\$10000=\$E4,MASTER_LIST!\$L\$2:\$L\$10000)),0)),0)}

### Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

#### ISY

##### Active Member
Hi

VBA Code:
``Range("A4").FormulaArray = "=IFERROR(INDEX(MASTER_LIST!\$T\$2:\$T\$10000,MATCH(\$C4,IF(MASTER_LIST!\$M\$2:\$M\$10000=\$D4,IF(MASTER_LIST!\$N\$2:\$N\$10000=\$E4,MASTER_LIST!\$L\$2:\$L\$10000)),0)),0)"``

#### jvoss

##### Board Regular
Sorry looks like i did a bad job in explaining what is going on. the formula is in 21000 rows, not just one row. so each time i do a keystroke it recalculates and it takes over 10 min before i can do the next keystroke. even worse when i do a save, it takes over 1hour to save.

#### jvoss

##### Board Regular
problem resolved with removal of auto calculate..

Replies
3
Views
148
Replies
6
Views
300
Replies
0
Views
218
Replies
5
Views
168
Replies
0
Views
110

1,129,410
Messages
5,636,127
Members
416,900
Latest member
Mokor

### 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