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

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,223,702
Messages
6,173,947
Members
452,539
Latest member
delvey

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