Hi,
I am looking to search a set of data using a loop statement where the returned information is reliant upon data in various columns. For example, the data below is an example of the information held.
Columns A to E have headings
Project Ref
Quote No
Quote Date
Due
No of quotes since due
Rows 1 to 13 hold data as below
Project Ref Quote no Quote Date Due No of quotes since due
100001 901234 03/01/2016 No
100002 901235 04/01/2016 No
100002 901236 04/01/2016 Yes
100002 901237 05/01/2016 No
100003 901238 10/01/2016 Yes
100003 901239 12/01/2016 Yes
100004 901240 01/02/2016 No
100005 901241 03/02/2016 No
100005 901242 04/03/2016 Yes
100005 901243 05/03/2016 No
100005 901244 15/04/2016 Yes
100006 901245 09/05/2016 No
I need to be able to loop through the project references and fill the cells in column E with the data returned from the loop.
If a project has a "due" flag set to "Yes", tell me how many quotes (count of quote No) have occurred for that particular project reference. The loop through the data to find the last instance of the project reference and exit the loop. The data above is a sample of the worksheet I am using and in some instances the same project reference occurs in 20 separate rows. The loop should also count the initial quote where the due flag is set.
As an example, project reference 100002 in A2, would return a value of 0 in E2 but a value of 2 in E3. E4 should also show 0 as it has already been counted.
Desperate for help here as its got me pickled.
Thanks all
G
I am looking to search a set of data using a loop statement where the returned information is reliant upon data in various columns. For example, the data below is an example of the information held.
Columns A to E have headings
Project Ref
Quote No
Quote Date
Due
No of quotes since due
Rows 1 to 13 hold data as below
Project Ref Quote no Quote Date Due No of quotes since due
100001 901234 03/01/2016 No
100002 901235 04/01/2016 No
100002 901236 04/01/2016 Yes
100002 901237 05/01/2016 No
100003 901238 10/01/2016 Yes
100003 901239 12/01/2016 Yes
100004 901240 01/02/2016 No
100005 901241 03/02/2016 No
100005 901242 04/03/2016 Yes
100005 901243 05/03/2016 No
100005 901244 15/04/2016 Yes
100006 901245 09/05/2016 No
I need to be able to loop through the project references and fill the cells in column E with the data returned from the loop.
If a project has a "due" flag set to "Yes", tell me how many quotes (count of quote No) have occurred for that particular project reference. The loop through the data to find the last instance of the project reference and exit the loop. The data above is a sample of the worksheet I am using and in some instances the same project reference occurs in 20 separate rows. The loop should also count the initial quote where the due flag is set.
As an example, project reference 100002 in A2, would return a value of 0 in E2 but a value of 2 in E3. E4 should also show 0 as it has already been counted.
Desperate for help here as its got me pickled.
Thanks all
G