Adding Index Match Formula inside a cell with the use of Macros

raven1124

New Member
Joined
Jun 13, 2017
Messages
29
Hello Guys,

I'm in need of your professional help with this one as I have observed that my excel file tends to get slow when I add the function for Index + Match in each cell. I've observed that my sheet tends to load right after I made changes with the database sheet that I'm using to reference the value of each cell in a column.

He's the sample formula that I've used for each cell to get my desired result: =IFERROR(INDEX(Database!$DF:$DF,MATCH($C$5&D$11,Database!$C:$C&Database!$M:$M,0)),"N/A")

Would it be possible to use a loop for this one and if it possible, can the values be pasted only instead of the formula to void the lag inside the worksheet.


Sample Table below: (Note: the cells with 0,1 & N/A would mean that I used the Index + Match for each of them)
[TABLE="width: 736"]
<tbody>[TR]
[TD]Work Week #:[/TD]
[TD]Week 1[/TD]
[TD]Week 2[/TD]
[TD]Week 3[/TD]
[TD]Week 4[/TD]
[TD]Week 5[/TD]
[TD]Week 6[/TD]
[TD]Week 7[/TD]
[TD]Week 8[/TD]
[TD]Week 9[/TD]
[TD]Week 10[/TD]
[/TR]
[TR]
[TD]Topic[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Subject 1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Category 1[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]N/A[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Category 2[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]N/A[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD][/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Category 3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TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Category 4[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]N/A[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

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

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top