+ Reply to Thread
Results 1 to 8 of 8

2 buttons Macros just to get to subsequent blank cell, ea with slightly different criteria

  1. #1
    Forum Contributor
    Join Date
    10-08-2019
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    326

    2 buttons Macros just to get to subsequent blank cell, ea with slightly different criteria

    Hi everyone,


    Explainer of my situation:
    I just need cursor to jump to (sel) the following subsequent GREEN cell down each column range ON EACH CLICK. So, for IN-section, start looking for cells highlighted by conditional format GREEN from (including) AW9 downwards, and for OUT-section, starts looking from BP9 downwards on EACH click of their own section’s button.
    There are only 2 sections: IN (purple) and OUT (orange). Each button takes care of its own section: one button in Status-in and one button in Status-out. As soon as the dynamic (growing data) body’s last filled row is reached, in this example say it is row38 is reached then I need the button’s loop to stop checking anymore & inform me with probably a MsgBox “End reached, no more data to evaluate.” I do not necessarily enter any data into the GREEN cells each click is just to go and browse the cell as & when button clicked each time, just to jump from 1 green to another green cell mainly for regular view, evaluate & decide proper work to do on each pending donation item, so data entry may be entered.

    Cell green background fill is set in the total workbook capacity data range AW9:AW10000, BP9:BP10000 conditional formatting simply as a highlight to alert admin of the unfinished items to evaluate to decide enter "ok" or "returned" from the dropdown entry.
    The conditions for the green fill for AW is if AV has a numeric value, while AK, AV, S also have data.
    Note: columns S, AK, AV values are returned by different INDEX,MATCH function formulas, while AW is manual user input.
    The conditions for the green fill for BP is if BP is blank, BO has a value & BO is a numeric value (not text), while BG, BN also have data. BG, BN, BO values are returned by different INDEX,MATCH function formulas , while BP is manual user input.

    Button-1:
    Please Login or Register  to view this content.
    Button-2:
    Please Login or Register  to view this content.


    (these codes are also what i wrote for the 2 buttons in my workbook)

    The codes are not working and despite my retesting with different possibilities, i feel hopeless my work is getting nowhere, can anyone kindly offer me the right way ?

    I include my sample workbook so that anyone who can Help me will understand my problem without any misunderstanding. I attached my simplified but accurate sample workbook which has only 1 sheet with 38 rows.


    Stewart
    Attached Files Attached Files

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: 2 buttons Macros just to get to subsequent blank cell, ea with slightly different crit

    Hi again MannStewart,

    You mentioned in the previous thread that my code was your best option, but I see that the codes in this book are quite different. Was your intention to essentially use my approach, but with added criteria?

    Additionally, why start at row 9? Doesn't data start on row 3? And... why are you checking offset(1,-30)> that looks at column S, but 1 row below the current row?
    Last edited by Arkadi; 06-05-2020 at 11:01 AM.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Forum Contributor
    Join Date
    10-08-2019
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    326

    Re: 2 buttons Macros just to get to subsequent blank cell, ea with slightly different crit

    Hi Arkadi!

    yes, I actually only tried your code after posting in this thread, because I carelessly thought Karmapala's code worked, after trying his code first (false hope & my mistake). After countless trials and failures losing sleep adjusting your code I arrived to the best of my limitations to like this (below), 1 for each section, but the issue i have now is they are still slow in my main workbook which goes right now all the way to row 6,000+. I realised in my trials that your code is actually looping by activating and 'resting' before continuing to next offset from each new blank that meets the criteria, thus making the loop somewhat slowing the worksheet on each click, and although your suggested was use ScreenUpdate=False, the page does not follow down to the ActiveCell that are much lower down, so I used SmallScroll but it makes the sheet rapidly flash & it gets nauseating after awhile on every click. Do you have any way to improve the search speed & how to pan the screen so that activecell is always 2 columns from the RIGHT side of the screen (not left) without SmallScroll or Application.Goto ActiveCell, Scroll:=True ? For section-1, have to see AK & AV, and for section-1, have to see BG & & BP, note that there are a number of used columns in between so the column AV and BP must be pushed to the extreme right side of the screen that's the place I can view AK for sec-1, and BG for sec-2 on each click.


    There are title headers from row 1 to 8, it's due to the need to describe each column by notes which are necessary, so all data start from row 9.
    For sec-1, I use column S (-30) , or as a 'reliable' ALWAYS-FILLED column for the loop to stop because your code kept going all the way down past rows 6,000+ i didn' t know how else to stop the process once no more data is reached so I thought I should rely on S which is always filled (-11 is always filled like -30, but nearer & does the same for sec-1, -18 is always filled till last filled row for sec-2).

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.


    Looking forward to your reply,

    Stewart
    Last edited by MannStewart; 06-05-2020 at 12:43 PM.

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: 2 buttons Macros just to get to subsequent blank cell, ea with slightly different crit

    Your sample books really should reflect the layout of the real thing... makes it easier to understand. I am referring to rows in sample starting at 3, while you explain it is 9.

    In any case... If I've understood what you need, then try this for the AW column.... I'll work on the other one after we find out if I've understood. Also want to know if this is truly faster or not.

    Please Login or Register  to view this content.
    I may re-write this later to work with an array instead of ranges if the speed is still not good.
    Last edited by Arkadi; 06-05-2020 at 01:00 PM.

  5. #5
    Forum Contributor
    Join Date
    10-08-2019
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    326

    Re: 2 buttons Macros just to get to subsequent blank cell, ea with slightly different crit

    hi Arkadi

    yes, sorry about my sample workbook slip-up on row 5 which is actually row 9.

    Thanks for your sec1 code. Yes this one works faster than your original, but it still blinks once on every click & one can kind of catch a glimpse of the lagged cursor jumping, (whereas Karmapala's code does not blink / lag at all & it is still fastest it just skips to the next blank and you can't catch any glimpse of it, although that code hasn't fully worked yet. Is it your suggested method of looping that is resulting in a slight lag & blink on ea click ?) Also, your this code still doesn't pan the screen to the consecutive further blanks active cells below, that i need it to as i mentioned previously.

    Any way to?


    Stewart
    Last edited by MannStewart; 06-06-2020 at 02:32 AM.

  6. #6
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: 2 buttons Macros just to get to subsequent blank cell, ea with slightly different crit

    Sorry thought it would pan to the cell.... I’ll revise when I can.

  7. #7
    Forum Contributor
    Join Date
    10-08-2019
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    326

    Re: 2 buttons Macros just to get to subsequent blank cell, ea with slightly different crit

    Thanks for everthing you helped me with Arkadi, i think i can manage to do with the mod based upon your and Karmapala's code for timebeing

    cheers
    Stewart

  8. #8
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: 2 buttons Macros just to get to subsequent blank cell, ea with slightly different crit

    Thanks for the feedback I've been away a few days, I guess you have it under control for now. If you need more help then don't hesitate to ask!

    Best of luck!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Subsequent Change Events re-triggering other macros
    By Jarris93 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-21-2015, 08:23 AM
  2. [SOLVED] To get the Subsequent Cells Blank (Clear) for Each Change In the Drop Down Cell
    By tonisjoseph in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-15-2015, 01:52 AM
  3. I need a Macros to use 3 filters based on cell value and activated by buttons
    By ferndiazabarca in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-04-2015, 11:01 AM
  4. Macros with buttons, spin buttons, scroll buttons, etc.
    By qqbbppdd in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-12-2013, 09:34 AM
  5. [SOLVED] Easiest way to return a blank cell that can be used in subsequent calculations
    By GavJ in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-15-2013, 01:15 AM
  6. Default text in 1 cell when blank - to remain once subsequent text deleted
    By thedude1222 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-13-2013, 08:45 AM
  7. Changing / overwriting cell values using macros / scripts / buttons
    By Cheshire in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-15-2009, 05:59 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1