Writing a formula based on a drop down

Pauljj

Well-known Member
Joined
Mar 28, 2004
Messages
2,047
Morning all,

What I am trying to achieve, a user clicks on a drop down on one sheet at which point a formula is written on another range of cells on another sheet

What I wrote (which doesn't error, it just does nothing) is

Code:
Private Sub Worksheet_Change(ByVal Target As Range)


Application.EnableEvents = False


Dim x As Variant
Dim y As Variant



On Error Resume Next


If Not Intersect(Target, Me.Range("C2")) Is Nothing Then Sheets("Freight Data").Range("AO2:AO700000").Formula = "=IF(MONTH(T2)=MATCH(BMonth,MONTHS,0),1,0)"

Any thoughts on what I might be missing ?
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Are you sure you want to write to 700 thousands rows every time you change a value in C2, it is going to make it very slow!!
 
Upvote 0
Are you sure you want to write to 700 thousands rows every time you change a value in C2, it is going to make it very slow!!
Unfortunately I have 700k rows of data, I need to change the response based on what month they select, I am aiming to remove the formula once it's been written
 
Upvote 0
I have worked out a solution so please ignore

Glad to hear you got the solution.

Do you mind posting about your solution? Then it is perfectly fine to mark your post as the solution to help future readers.
 
Upvote 0

Forum statistics

Threads
1,215,422
Messages
6,124,811
Members
449,191
Latest member
rscraig11

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