Good morning to the community!
I would like to delete 20 numbers randomly in the column C.
Can you help me to do this?
Thank you very much for your answer!
Capture.PNG
Good morning to the community!
I would like to delete 20 numbers randomly in the column C.
Can you help me to do this?
Thank you very much for your answer!
Capture.PNG
Last edited by Luu4466; 09-13-2021 at 06:14 PM.
Hi, maybe you could use something like this:
CheersPlease Login or Register to view this content.
Erwin
I started learning VBA because I was lazy ...
Still developing.... being more lazy...
@Eastw00d: Unlesss I misunderstand I think there may be a small issue with your VBA solution. There's a small chance that you get the same random number more than once during the 20 loops in which case you will end up with less than 20 rows to delete.
@Luu4466: Attached is a non-VBA solution if you prefer. It does however have the disadvantage of requiring some manual steps. Attached is a trimmed down version of your file illustrating the method.
In N2 copied down:
In O2 copied down:Formula:Please Login or Register to view this content.
In P2 copied down:Formula:Please Login or Register to view this content.
Formula:Please Login or Register to view this content.
Sort by column-P then delete the rows with "remove" in column-P
Geoff
Did I help significantly? If you wish, click on * Add Reputation to say thanks.
If your problem has been resolved please select ?Solved? from the Thread Tools menu
@Geoff,
Thanks for your remark!
There is a small chance if the mentioned row still exist after a loop (in case of the coloring), but they are deleted.
Cheers
Erwin
Thank you a lot for your solution @GeoffW283.
Thank you a lot for your proposal @Eastw00d.
Thanks for the feedback. Glad we could help.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks