asked on
Remove rows containing 2 or more numbers from different decis
There should be:
1) a prompt would ask for input of "Maximum numbers allowed from different decis" or something similar. If the input is one (1) then
2) choose the sheet to be processed
3) sheet "Numbers_3" would be edited as follows:
This process should be able to be repeated for any sheet similar to "Numbers_3"
Notice how all the green rows contain number from only 1 "deci". That is the goal.
Remove-rows-with-2-or-more-numbers-.xlsb
ASKER
Are you saying that 3-4-10-11-20 which was valid in the last question is not valid now because there is more than one decie with 2 or more entries?
correct.
And are you also saing that this should happen only if the "Maximum numbers allowed from different decis" choice is 1?
not sure How to answer this. But since 3-4 and 10-11 are 2 numbers from different “decis” they should be removed. it’s similar to the last script except this time it’s numbers from different decis.
ASKER
BTW. You can use the last script and just add this to it if it’s easier.
Should I not even ask the "Maximum numbers allowed from different decis" question and assume it's always 2?
ASKER
The first is not possible.
The second is correct. No need to ask the question since there can only be a maximum of 2 from same ”deci”.
ASKER
Is it possible to merge this and the last script so they’ll run one after the other? Or will that be too much overhead?
ASKER
Again Numbers_3 is done but now you won't have a problem doing it again.
29173375a.xlsb
ASKER
No worries. I’d rather get that error. I got it on the previous one also. It alerts me that the sheet was already processed.
ASKER
The request for combined version has been posted. I have reset 3 and 7 and added 4 and 8 for testing purposes, if needed.
I had a go at this just for fun. This runs the deletion in about 1 and a half minutes by first sorting so that all the deletion can be done in one hit.
It sorts back to the original order afterwards.
It assumes columns F and G are always blank and uses them for sorting.
Run the sub called main to test it out.
This may or may not be helpful. I haven't looked at the other solutions provided but posting it here just it case anyone wants it.
Remove-rows---via-sort-method.xlsb