Posts by esbencito

    Re: VBA to add IFERROR to all selected cells

    Impressive!! Just tested it, it reduced the run time from 2 hours to 10 seconds! Thanks!!!

    Is there a way to change the VBA code slightly, so that it only applies IFERROR to a current selection rather than having it to change within the Macro every time (changing sheet name and array etc.)? I had something similar in another code (see below) I used before, but don't know how to apply it to the above.

    Re: VBA to add IFERROR to all selected cells

    Below is the code I use to speed up all my Macros. Does anyone know why it is significantly slower in Excel 2016?

    Hi all,

    I'm trying to add IFERROR to all cells within a selection, but only if the cell does not already have IFERROR. I have a VBA code that does that, but unfortunately it takes hours to run as it loops through 1.5 million cells. Also, I always have to change the range within the Macro, but I would prefer a more 'flexible' method where it checks all cells within a current selection on a certain sheet. Can anyone help me simplify/speed up the code? Also, I'm using Excel 2016 and noticed that my codes slowed down even more when using below code compared to Excel 2010 (1~ hour to now 3~ hours roughly).

    Re: VBA to scroll simultaneously within certain sheets

    YES!! That's what I meant!


    If I scroll within the sheet "TTL APAC" to

    .ScrollColumn = 34.ScrollRow = 85

    then I want the code to move it to the same row and column position in sheet "China", "Korea", "HK Hub" etc. as well without having to select each of the sheets and doing it manually, so all sheets in the array will thus ALWAYS have the same window position, which will help me tremendously when reading data and switching between them...

    Re: VBA to scroll simultaneously within certain sheets

    It should run permanently in the background, so upon opening the file I guess. Whenever I'm in one of the above mentioned sheets, I want the code to scroll simultaneously in the other array sheets as well, so when I switch between sheets they all show the same position...

    Re: VBA to scroll simultaneously within certain sheets

    Just tried again, it still doesn't seem to work unfortunately! I pasted the code into the "ThisWorkbook" window, which I assume is correct? Also, I have added the names of the sheets I want to have move simultaneously (see below). Then I clicked "run sub" and tried to scroll but it keeps scrolling only in one sheet at a time...:dead:

    Re: VBA to scroll simultaneously within certain sheets

    I'm sorry!! This time with code tags...

    Can anyone help me with the below code to adjust it to my needs? Still can't figure it out unfortunately!

    Hi all,

    Is there a VBA code to have Excel scroll simultaneously among different sheets (not all sheets, only specific ones)? I would need something like the below but without having ALL sheets move their position...

    Hi all,

    I'm trying to combine two combo boxes in order to have them be dependent on each other:


    combo box 1 has the following items:


    combo box 2 has:


    Now I want them to 'call' a certain Macro if FY16 AND Q1 are selected or the combination FY17 and Q2 etc. etc. The Macros that are supposed to be activated depending on these two combo boxes are fairly basic, but I couldn't figure out so far how to combine two different combo boxes, currently I am only using one combo box and my VBA codes look the following:

    So how would I now add the second combo box to it?? :duh: