VBA Userform to insert new project and/or update an existing one

Clairexcel

New Member
Joined
Mar 23, 2021
Messages
31
Office Version
  1. 2016
  2. 2010
Hello everyone, I am new to this forum and quite new to VBA (few months). I have been searching and trying for a while now but I have to surrender and ask for help. I really hope you can help me and I'd be grateful if you do. Thank you in advance.

I have an excel file in which the users insert customer projects. Now a project may have only two stages (so two rows bellow the row with that customer name) or it may have up to 10 stages, so the number of rows per customer/project is variable. Column A of the sheet contains Customer name, and that is the ID which differentiates projects.
I need a userform to:
1. Insert new project, so, if a user clicks on " Add new Project" button than the userfrom has to add a new row in the first empty row on the sheet and color it in blue (or grey or whatever). So the user can insert in the referenced cells the information relative to that customer/project,, as per defined columns
2. Now the most difficult part.. If a user has to add a new stage (so a new row) in an already exsting project (projects are identified with customer names), then the user should be able to click the update existing project button on the userform and insert the customer name for which he updates the project. So the vba code should search for the customer name the user types in the userform and add a new row bellow the last one containing that specific Custome name (customer names are in column A).
The columns go from columns A to AJ, and as I already specified columns A contains the Customer name which in the end diferentiates projects.
I hope I explained what I am trying to achieve, however I attach picture.
Thank you in advance for any help you are willing to give.
 

Attachments

  • Takings Sheet customer project.JPG
    Takings Sheet customer project.JPG
    122.5 KB · Views: 7

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Watch MrExcel Video

Forum statistics

Threads
1,129,751
Messages
5,638,150
Members
417,010
Latest member
jnuss03

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top