Selecting a random 10% of data from different tabs

Tori Murphy

New Member
Joined
Jul 5, 2022
Messages
10
Office Version
  1. 2013
Platform
  1. Windows
Hi Everyone.

I am a total newbie to Macros, I love them, think they are amazing but have no clue how to use them or make them so I am praying someone out there can help me. I have googled this to hell and back and I'm still none the wiser!

I have an excel document with 5 tabs containing data. I would like to select a random 10% from each tab so that information can be placed in a new 'audit tab'. I guess it would be like a VLookup but randomly and without an originating source.

God this sounds so much easier now I've typed it.

Any help would be super appreciated.

Thanks

Tori
 
Hi Troi.
I'm just dropping by here.
Do you have a worksheet named "random10"?
If you don't have that, VBA gives you error #9.
 
Upvote 0

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Hi Troi.
I'm just dropping by here.
Do you have a worksheet named "random10"?
If you don't have that, VBA gives you error #9.
Ahhh I see, no my worksheet is called application log.

Basically I have 8 tabs.

In Tab 6 i want it to pick 10% from each tabs 1-5 and poputlate in tab 6.

In tab 7 I want it to take 10% from tab 6 only and populate it in tab 6.

I know excel is a massive tool and it can do very powerful things, I just have no clue how to make it happen. I don't understanding coding even though it amazes me and I would love to learn it.
 
Upvote 0
this is weird ??? I don't understand
We have two levels of management checks.

Level 1 will be doing an audit on 10% of each department (10% from each tab 1-5)
Level 2 will be doing an audit on 10% of what level 1 audited. (10% from tab 6)

The departments are in tabs 1 - 5
 
Upvote 0
I have an excel document – Application Log Rev1 within this document I have 7 tabs.

Tabs 1 – 5 are departments with information

Tab 6 is Level 1 management audit – Basically a manager needs to extract a random 10% of each department and copy the data, I’m assuming it’s like a VLookup but a little more in depth, because I want the macro to randomly select the data.

Tab 7 is level 2 management audit – Basically a higher up manager is looking at the level 1 managers work to audit him. Level 2 needs to extract a random 10% from Tab 6 etc.

I am confident this can be done with excel as I know it’s super powerful. However, my problem is I have absolutely no clue when it comes to VBA’s Macro’s. I also think what I am asking for is quite complex.
 
Upvote 0
i did.
and i see you understood the new version with immediately 10% (before dinner that was still 100%, so i changed the bold text here below) in tab6 (Random10) and 10% of that 10% in tab7 (doublecheck)
Rich (BB code):
 If ptr >= UBound(arr) * 0.1 Then Exit For      '10% achieved : YOU CAN MODIFY THIS TO 0.99 AND CHECK IF THERE ARE NO DUPLICATES IN THE TABLE
 
Upvote 0
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Code for Random 10% Audit of Department
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Code for Random 10% Audit of Department
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.

i did.
and i see you understood the new version with immediately 10% (before dinner that was still 100%, so i changed the bold text here below) in tab6 (Random10) and 10% of that 10% in tab7 (doublecheck)
Rich (BB code):
 If ptr >= UBound(arr) * 0.1 Then Exit For      '10% achieved : YOU CAN MODIFY THIS TO 0.99 AND CHECK IF THERE ARE NO DUPLICATES IN THE TABLE
This is going to kill me I swear.

It doesn't seem to want to work at all....
 
Upvote 0

Forum statistics

Threads
1,223,912
Messages
6,175,340
Members
452,638
Latest member
Oluwabukunmi

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