Converting formula to VBA

manc

Active Member
Joined
Feb 26, 2010
Messages
340
Hi Demigods,

I have the following formula as an example in cell F1 of my sheet:
Code:
=IFERROR(IF((VLOOKUP(D1,SSCC_bin_H!A:A,1,FALSE))=SSCC_counter_H!D1,"A",""),"")

This formula is in every single row of column F to the bottom of the sheet - in this case row 205102.

As you can imagine, it slows down the functionality of the sheet no end, and this type of formula (or a variation of) is repeated in other columns too!

What i'd really like to do, as per google sheets, is put an array formula in F1 and it populates the whole column. Failing that, can someone help me with VBA code to achieve the same?

Any help much appreciated.
Best regards
manc
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
One immediate observation is that you won't necessarily need to use VLOOKUP in every row:

=IF(D1=SSCC_counter_H!D1,IF(ISNUMBER(MATCH(D1,SSCC_bin_H!A:A,)),"A",""),"")

We can also write much faster VLOOKUP (or MATCH) constructions if we sort SSCC_bin_H!A:A.

A VBA solution may be appropriate.

But I can't imagine why you need hundreds of thousands of lookup formulas across multiple columns in any event. What are you doing with your data?
 
Upvote 0

Forum statistics

Threads
1,214,984
Messages
6,122,601
Members
449,089
Latest member
Motoracer88

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