Sharid
Well-known Member
- Joined
- Apr 22, 2007
- Messages
- 1,066
- Office Version
- 2016
- Platform
- Windows
Hi
In my workbook I have two sheets
Sheet1 = "Scraper"
Sheet2 = "Url List"
In Sheet 2 Column "A" Row 2 I have a list of URLs, every time one has been processed my code place a NUMBER "1" in column B next blank row.
The number "1" have two purposes, one as a counter and two to indicate that the this cell has been processed. What I need is for my code to ONLY run on urls that do not have the number 1 in column B sheet2
Sheet2
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD="align: center"]URLS[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]https://www.mysite.com[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]https://www.thissite.co.uk[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]https://www.yoursite.com[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]https://www.supersite.co.uk[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]https://www.funsite.com[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]https://www.bestsite.com[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]https://www.helpfulsite.com[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
In the above example the first 3 urls have been processed, therefore when the code is run again it will start from the 4th url https://www.supersite.co.uk
Something like an IF Statement e.g.
IF Sheet2. "Url List" column "B" = "" then
MY CODE HERE
Else
IF Sheet2. "Url List" column "B" = 1 then
Start my code from here
If There are NO urls left to process then message box "Process completed, there is nothing to process"
Thanks
In my workbook I have two sheets
Sheet1 = "Scraper"
Sheet2 = "Url List"
In Sheet 2 Column "A" Row 2 I have a list of URLs, every time one has been processed my code place a NUMBER "1" in column B next blank row.
The number "1" have two purposes, one as a counter and two to indicate that the this cell has been processed. What I need is for my code to ONLY run on urls that do not have the number 1 in column B sheet2
Sheet2
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD="align: center"]URLS[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]https://www.mysite.com[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]https://www.thissite.co.uk[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]https://www.yoursite.com[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]https://www.supersite.co.uk[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]https://www.funsite.com[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]https://www.bestsite.com[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]https://www.helpfulsite.com[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
In the above example the first 3 urls have been processed, therefore when the code is run again it will start from the 4th url https://www.supersite.co.uk
Something like an IF Statement e.g.
IF Sheet2. "Url List" column "B" = "" then
MY CODE HERE
Else
IF Sheet2. "Url List" column "B" = 1 then
Start my code from here
If There are NO urls left to process then message box "Process completed, there is nothing to process"
Thanks
Last edited: