Combine VBA tasks into one

Excelerator147

New Member
Joined
Feb 24, 2020
Messages
1
Office Version
  1. 2010
Platform
  1. Windows
I am trying to combine 2 VBA tasks that I wrote into one long string. Both of the codes are attached to separate command buttons. I am very new at coding and have been searching everywhere, with no success. For context, it is a salesperson commission report. The initials, NB and ET, are the data points that drive where to paste the rows in the corresponding spreadsheet. My company has about 15 sales reps and I would like to have 1 command button to perform the codes, not 15 separate buttons.

Any help would be appreciated!... I have a quarterly bonus riding on this, PLEASE help =)



1582575297032.png

1582575382237.png
 

Attachments

  • 1582575337653.png
    1582575337653.png
    28.2 KB · Views: 3

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
@Excelerator147

Hi just a tip, but post your actual code rather than a picture.
You will note likely get help if your code can be copied easily.
 
Upvote 0
In the first of the pictures,
type Select Case between the For line and the If line and hit the F1 key for an idea of how they can be combined.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,731
Members
448,987
Latest member
marion_davis

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
Back
Top