Macro Requirements

Total Page:16

File Type:pdf, Size:1020Kb

Macro Requirements

Macro Requirements

General Requirements:

- Compatible with Excel 2010

- Able to process 70,000 rows

Macro 1 – Insert Missing Invoice Numbers

Previous Design

- The macro inserted missing rows and values when there were missing invoice numbers in an invoice sequence. Each unique sequence is identified by the alphabetic characters at the beginning of the invoice number.

- Duplicate invoice numbers were not affected by the macro (left undisturbed).

- The inserted row was highlighted.

- Only ran on highlighted rows.

Example from the last macro:

10-21-2011 Higgins Charlotte RB4500 Higgins 10-27-2011 Smith Joan RB4501 Smith RB4502 10-22-2011 Miller Peggy RB4503 Miller 10-29-2011 Jones Sue B22098 Lafontaine B22099 10-29-2011 Wood Mary B22100 Wood B22101 B22102

New Design Features (new columns are now included)

- In addition to inserting the missing invoice number, the macro should also copy and insert the Date Entry (Column B), Date Receipt (Column C), and RC (Column D) values from the previous row into the row of the missing invoice number.

- Runs on ALL rows – not just highlighted rows.

- Leaves duplicate invoice numbers undisturbed.

- Each invoice number in the table is assigned an RC number (always a four digit number) and all invoice numbers are sorted by RC so that all RC values are listed together. The macro needs to treat invoice sequences with different RC numbers as different sequences. This is shown in the example below. There is a jump in the invoice numbers from RJ1045 to RJ1100 but the macro ignores this because the RC numbers are different.

Date Date Entry Receipt RC Last Name Invoice # 10/10/201 1 10/10/2011 4070 Wood RJ1045 11/10/201 1 11/10/2011 5791 Bullock RJ1100 12/10/201 1 12/10/2011 5791 Shields RJ1101 12/10/201 1 12/10/2011 5791 RJ1102 12/10/201 1 12/10/2011 5791 Roberts RJ1103

- The macro should only insert missing invoice numbers if the jump from one invoice number to another in the same sequence in the same RC is less than 20.

- If it is a jump of 20 or more, the macro should highlight the affected rows red and NOT insert the missing invoice numbers. Please see the example below.

09/10/201 1 09/10/2011 4070 Bing RJ1114 10/10/201 1 10/10/2011 4070 Wood RJ1045

Macro 2 – Identify Out of Sequence Numbers

- This macro would run after the first macro had run to insert missing invoice numbers.

- This macro would highlight all rows that meet ANY of the conditions below:

o Contains any special characters (i.e., !@#$%^&*) or punctuation marks.

o Has the same invoice number as the preceding OR following row (i.e. a duplicate number).

o Has a different amount of characters than the preceding AND following invoice numbers.

o Is in a different sequence (i.e., different opening alphanumeric characters) than the preceding AND following invoice numbers. You can ignore the RC number for this condition. o Does not contain either one or two alphabetic values at the beginning of the invoice number. o Does not begin with the letter R. o Does not end with at least four numbers. o Contains more than 8 alphanumeric characters.

Recommended publications