Worksheet_SelectionChange

GRCArizona

Board Regular
Joined
Apr 24, 2010
Messages
95
Hi - I'm somewhat new to VBA and I'm having trouble with Worksheet_SelectionChange event. I've got a Forecasting spreadsheet that has about 20 worksheets (1 'Input Sheet' and 19 other worksheets - 1 sheet for each of our 19 products). On the 'Input Sheet', I have a Data Validation drop down list in cell $B$1 for our 19 products. All Forecasting will be entered on the 'Inputs Sheet' in the range $C$4:$C$10. We will be making daily changes to our Forecast and what I'm trying to accomplish is the following: On the 'Input Sheet', user enter forecast data for 'Product 1'. Once the user is done and activates the Data Validation in cell 'Input Sheet'!$B$1', VBA should copy the info in $C$4:$C$10 to the Product 1 worksheet to the range 'Product 1'!$D$12:$D$18'. Once a new product is selected in $B$1, (IE: cell value changes from Product 1 to Product 2), the Sales information that is currently stored in 'Product 2' worksheet range $D$12:$D$18, should be brought over to the Input Sheet range $C$4:$C$10.

Is there a way to do this? Is the best way to use the _Change event?

any help is greatly appreciated,
thx, GRC
 
Hi Lenze - Incorporated the "paste values" and it works great. It did copy over the formula but I just had some code in the macro to rewrite the formula.

Regarding your last post: I was actually incorporating something similar

Dim sProduct_Group1 As String

but I think I like your way better. Your code reads easier.:)

thanks again for all your help. Slowly but surely, it seems VBA is getting a little easier.

GRC
 
Upvote 0

Forum statistics

Threads
1,226,771
Messages
6,192,919
Members
453,767
Latest member
922aloose

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