1st sheet is "Master", which is a list of accounts, and new accounts are being created by users on a regular basis. Each row represents one record/account.
2nd sheet is "Template", which is pre-filled with formulas and pre-formatted cells. *** "Template" will be a hidden sheet
TO create/add a new account, user would enter account details in the last unused row. Only 4 fields will be entered (into cells A to D):
A = Client number (up to 9 digits)
B = Client name (alpha)
C = Account ID (up to 5 digits)
D = Account Number (up to 7 digits)
***** a client may have multiple accounts, so A and B are not unique, but the C+D combination is unique in the account list
The macro I need:
- After user enters a new account (i.e. A-D in a new row), they will click a button to activate the macro (to do the following)
- Checks to see if new account just entered (i.e. last row) already exists in rows above by checking the C + D combination (e.g. "12345 1234567"). Display error message if already exist, and clears last row data
- Inserts a new sheet by making a copy of the "Template", and name it using the values entered in C and D (i.e. "12345 1234567"), placed after "Master" (in other words, newest sheet will always be the 2nd visible sheet.
It would be a bonus is the following can also be added to the macro:
- the cell "E" of the newly added row/account in "Master" be linked to cells W5 of the newly created sheet. For example, if user entered new account in the 7th row in "Master", the value in "E7" will be a lookup of value in "W5" of the newly created sheet.
Hope someone can help.
2nd sheet is "Template", which is pre-filled with formulas and pre-formatted cells. *** "Template" will be a hidden sheet
TO create/add a new account, user would enter account details in the last unused row. Only 4 fields will be entered (into cells A to D):
A = Client number (up to 9 digits)
B = Client name (alpha)
C = Account ID (up to 5 digits)
D = Account Number (up to 7 digits)
***** a client may have multiple accounts, so A and B are not unique, but the C+D combination is unique in the account list
The macro I need:
- After user enters a new account (i.e. A-D in a new row), they will click a button to activate the macro (to do the following)
- Checks to see if new account just entered (i.e. last row) already exists in rows above by checking the C + D combination (e.g. "12345 1234567"). Display error message if already exist, and clears last row data
- Inserts a new sheet by making a copy of the "Template", and name it using the values entered in C and D (i.e. "12345 1234567"), placed after "Master" (in other words, newest sheet will always be the 2nd visible sheet.
It would be a bonus is the following can also be added to the macro:
- the cell "E" of the newly added row/account in "Master" be linked to cells W5 of the newly created sheet. For example, if user entered new account in the 7th row in "Master", the value in "E7" will be a lookup of value in "W5" of the newly created sheet.
Hope someone can help.