ShogunStealth
New Member
- Joined
- Nov 6, 2021
- Messages
- 23
- Office Version
- 2019
- Platform
- Windows
I have a large spreadsheet with more that 400K rows of data on Sheet(1) with several columns but one column H contains URLs. I can copy the URLs to a another sheet in the same book (Sheet(2) = "UniqueURL") in column A and only display unique URL in alphabetical order (with heading). I then expect the user to view this sheet and list of URL and place a value in column B like "Keep" next to the URLs they wish to keep. I cannot think of a better ways of capturing the user selections for a list that can be more than 300 options. The selections may be one or several websites. I am struggling to write some vba code that will allow me to then delete all and entire row of data and remove the blanks on Sheet(1) that don't match the "keep" URLs. So that only the rows of data selected remains without any gaps based on the selection on Sheet(2). The matching should be on whole cell not partial. For example;
Sheet(2)
http://fruit.com.au/SummerFruit/ Keep
http://fruit.com.au/SummerFruit/Citrus/Madarin/ Keep
http://fruit.com.au/SummerFruit/Mangoes/
http://fruit.com.au/SummerFruit/Watermelon/ Keep
Selecting http://Fruit.com.au/SummerFruit/ does not automatically include subsites not selected like http://Fruit.com.au/SummerFruit/Citrus/ unless selected (like http://Fruit.com.au/SummerFruit/Citrus/Madarin/ ) or http://Fruit.com.au/SummerFruit/Mangoes/
I have never used arrarys before so I'm a bit lost but vaguely understand indexing a variable with multiple values. I would prefer to perhaps use a "find" somehow. Also, because there are so many rows I need some efficient code that runs quickly. Appreciate any help our thoughts.
Sheet(2)
http://fruit.com.au/SummerFruit/ Keep
http://fruit.com.au/SummerFruit/Citrus/Madarin/ Keep
http://fruit.com.au/SummerFruit/Mangoes/
http://fruit.com.au/SummerFruit/Watermelon/ Keep
Selecting http://Fruit.com.au/SummerFruit/ does not automatically include subsites not selected like http://Fruit.com.au/SummerFruit/Citrus/ unless selected (like http://Fruit.com.au/SummerFruit/Citrus/Madarin/ ) or http://Fruit.com.au/SummerFruit/Mangoes/
I have never used arrarys before so I'm a bit lost but vaguely understand indexing a variable with multiple values. I would prefer to perhaps use a "find" somehow. Also, because there are so many rows I need some efficient code that runs quickly. Appreciate any help our thoughts.