VB BUTTON - Complex Macro Wanted...

rasd222

New Member
Joined
Apr 29, 2003
Messages
18
O
Hello Vb masters, I'm trying to do something way over my head, I need serious help.. I would like to make it such that when my user presses a button, the data that they cut and pasted into a worksheet automatically gets cut and pasted into another sheet of in workbook. THere are several references/lookups that must be done though, so that the data is delivered into the right columns and rows in my other worksheet.

To reference what column it must go into I have the first worksheet of my application where the user must select from combo box the "month" and the "week" of the data they are about to copy and paste into worksheet2 The steps are as follows:

1. users pick the month and week from combo boxes on worksheet1
2. they paste data into worksheet2 (the data they paste is from an external source but the first column has fields that match the fields in my other worksheet, worksheet3)
3. they press a button after they finished copying and pasting the data into worksheet 2, and then the data automatically gets cut and paste into it's appropriate place in worksheet3.

for example,

-Let's say I chose "march" and "week1" as my selections from combo boxes on worksheet 1. (this means I'm about to cut and paste the march, week1 data into worksheet2)

-The data I'm cutting and pasting into worksheet2 looks like this:

red 12
blue 23
green 3


-Now the worsheet 3 (where the above data should be cut and pasted to when hitting my button) looks like this:


Jan Feb March
week1 week2 week3 week4 week1 week2 week3 week4 week1 week2
red
blue
yellow
orange
green



-I'm trying to make it so that after they hit the button, worksheet 3 then gets filled out correctly. in this case after hitting the button it should look like this:



Jan Feb March
week1 week2 week3 week4 week1 week2 week3 week4 week1 week2
red 12
blue 23
yellow
orange
green 3



The code needs to reference the month and week to put it into the right columns, and also the code must reference the first column fields to make sure that the correct rows are given the correct data... i.e. there was no orange or yellow data in my input, so I need to make sure that no data gets posted in there...

In worksheet three, I have the months in row 1 (four cells merged though) and the weeks in row 2 (4 cells -4 weeks- for each month)....

so...now how do I get that button to do this??
I'd appreciate any help...

rasd
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

rasd222

New Member
Joined
Apr 29, 2003
Messages
18
Hi all,
This is an important project. I dont think this task is too hard for a seasoned VB guy. Anyone know how to do this?

thanks again.
 

BrianB

Well-known Member
Joined
Feb 17, 2003
Messages
8,127
You are talking of a full application with details that are not very clear.
I don't think you will get a suitable reply - especially as most of us earn our living from producing this sort of thing (grin).

If you want help, you will need to start the project yourself and come back with specific problems you come up against. Start by doing the job without macros, so you get your sheets set up, and then find out what you need to do *step by step*. You can then use the macro recorder to produce the basic code. This can be copied/pasted into a message so that we can get a clearer picture of what you are trying to do.

Good luck.
 
Learn Excel from Bill Jelen

Understanding data is crucial, and the easiest place to start is with Microsoft Excel.

Forum statistics

Threads
1,151,491
Messages
5,764,676
Members
425,229
Latest member
Rashid mahmood

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