• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA Using button to randomly displaying (or filtering) one row from dataset and hiding the rest

stevewatto85

New Member
Hi all,

I'm having some issues with the code for a database I'm working on if you could offer some advice. I've created a button, which went clicked it will display or filter one random row from the data set and hide all the others. I need it show the entire row and my data starts on Row 15, which extends to row 115 for example but will grow so I need it to be dynamic. When clicked it will regenerate another random row that replaces the other. I already have a clear button to clear formatting.

Another option I was looking at was creating a pop out box to take information from one random row (has data in 4 columns, B through E) and putting it in a pop out box using my headings.

Thanks,
 
Hi,​
with consistant data you may use a filter or an advanced filter.​
The formatting in a message box could be tricky, could be better within an Userform but as filtering is the easy way to go …​
 
As it depends on the worksheet design so I can't guess but you can start manually with the Macro Recorder …​
 
Back
Top