Speeding up userforms / calculations

High Plains Grifter

Board Regular
Joined
Mar 9, 2010
Messages
129
Hello,
I have made a spreadsheet which people will use to look up cancelled bookings made with one airline through lots of different travel agents. The users will type in the (normally but not always unique) booking reference, and will get a small table of information about that booking, which is then copied into our computer system manually, and used as a basis for various calculations outside of Excel.

The main lookup table is a list 10 columns by 23057 rows. Depending on the travel agent used, the booking may also appear on another list which is 10 x 27943. I am using formulae like this to pull records out of these lists:

=IF(ISERROR(INDEX(lookup1!$A$2:$J$23057,SMALL(IF($D$3=lookup1!$A$2:$A$23057,ROW(lookup1!$A$2:$A$23057),""),ROW(1:1))-1,COLUMN(A:A))),"",INDEX(lookup1!$A$2:$J$23057,SMALL(IF($D$3=lookup1!$A$2:$A$23057,ROW(lookup1!$A$2:$A$23057),""),ROW(1:1))-1,COLUMN(A:A)))

When the user opens the sheet, a userform loads which asks them the booking reference. If no record is found, another loads to retry, and if it is found, the information from the preceding formula is displayed on another userform. If two records are found, the user is told to choose one, and that information is displayed. They click a buton on the form which copies the information and away we go.

Each travel agent also has a seperate sheet assigned to it, which contains advice etc relevant to that agent. The information userform also contains this information in tabs.

This is all fine, and all works, but it is so slow that no one can use it. How might I make things go a little quicker? I can post all the code etc if you like, and am willing to try any general tips you might have.

In total there are 6 fairly basic userforms on the file, and none have more than 3 buttons. There is some other code as well, for making the travel agent sheets from a template, but this is not long.

All help gratefully received.

ps. the sheet was made in 2010 and will be used by others in '97. It is even slower in '97.
Mark
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Hi mark

with so many cells to lookup against would it be worth stripping off the ISERROR part of the formula and handling the error condition separately?

Kevin
 
Upvote 0
OK, I'll give that a go, but I will have to add more code to handle the errors. I can but try, and will. Thanks for the idea. Is it a known problem that Excel gets a lot slower when you start adding userforms? I have not used them much before, but I thought that it would not have any problem with lots. Is there any way to find out what is taking up most of the time?
 
Upvote 0

Forum statistics

Threads
1,223,239
Messages
6,170,947
Members
452,368
Latest member
jayp2104

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