VLookup or Index_Match Macro

izzy

Board Regular
Joined
Jun 12, 2003
Messages
165
I'm just getting into VBA. :eek:
I need to at the very least do Vlookups with VBA to speed up my workbooks and reduce file size. Though I could be wrong.
My ranges are very large and the number of formulas is outrageous.

All cells from P13:P5000 contain this formula, dynamically.
VLOOKUP(A13,Orders!$Q$7:$S$7000,3,FALSE)

Q4000= IF(P4000="","",VLOOKUP(A4000,Orders!$Q$7:$T$7000,4,FALSE))

ect...

With this much math going on would a macro be helpful with speed and filesize or should I just leave it as it is?
 
Izzy_Demo.xls
PQRSTUV
1
2
3
4
500P13875139915598171
600P138752261308258223
700P138753237435100376
800P138754211144342207
900P13875591484389262
1000P138756352117198409
1100P138757188443398209
1200P138758353157168210
1300P138759116500279483
1400P138760464118205149
15
16
Orders
 
Upvote 0

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Private Sub Worksheet_Change Worked fine for what it is.
But My problem has to do with static data(can not be filtered). A database used for material requirments planning and material allocation planning. Bill of materials, ect...

Anyway...
I turn my formulas on and off with buttons/check boxes. if(a1=1,0,sumif_something).
if(E1=TRUE,lookupsomething,"") ect...
I was just curious if VBA could help me using LARGE static data tables.
Book2.xls
ABCDEFGHIJK
7Sheet1Sheet2
8ReportOrders
9PINNameTotalordersFirstDuetonmoreformulas>PinNameQtyOrderedDue
1000P138752nameofpc.9403/4/04suchas3/4/0400P138752nameofpc.2613/4/2004
1100P138753it's2833/29/04ifdatesnotsorted00P138752nameofpc.1233/12/2004
1200P138754who6903/15/0400P138752nameofpc.5564/7/2004
1300P138755Big10"9112/1/0300P138753it's463/29/2004
1400P138756AeroSmitty35212/30/0300P138753it's2373/29/2004
1500P138757ect1883/4/0400P138754who123/15/2004
1600P138758ect23533/12/0400P138754who4674/2/2004
1700P138759ect31162/1/0400P138754who2115/1/2004
1800P138744NotFound00P138755Big10"9112/1/2003
19macroworked00P138756AeroSmitty35212/30/2003
2000P138757ect1883/4/2004
2100P138758ect23533/12/2004
2200P138759ect31162/1/2004
Sheet1



BTW those formulas turning up errors was due to me changing my part number. Customer contracts demand privacy, maybe I shouldn't have posted sorry. =IF(E1944>0,VLOOKUP(A1944,Orders!$Q$7:$S$599,2,FALSE),"") E1944 does always turn up a real number. Zero or greater.
 
Upvote 0

Forum statistics

Threads
1,215,067
Messages
6,122,949
Members
449,095
Latest member
nmaske

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