Argument not optional problem If Not Intersect Private Sub Worksheet Change

DeeEmmEss

New Member
Joined
Nov 25, 2015
Messages
35
I have a woworksheet which gathers data from an external source and is continually updating - similar to stock prices. I am trying to copy a range of data in i8:i40. Have tried numerous ways but without success. Reading various forums the below seems most logical to meet my needs but i'm getting an error - Argument not optional, on the Intersect - below is my code.

Private Sub Worksheet_Change(ByVal Target As Range)

If Not Intersect(Target.Range("I8:I32")) Is Nothing Then
Columns("BT").EntireColumn.Insert

Range("BT8:BT40").Value = Range("I8:I40").Value


End If

End Sub

Suggestions as to where I'm going wrong welcomed.
 

Some videos you may like

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
36,086
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
There should be a comma there, not a full stop:

Rich (BB code):
If Not Intersect(Target, Range("I8:I32")) Is Nothing Then
 

DeeEmmEss

New Member
Joined
Nov 25, 2015
Messages
35
Thankyou RoryA, I've been trying all sorts, new it was something petty. Appreciate it.:)
 

Watch MrExcel Video

Forum statistics

Threads
1,122,736
Messages
5,597,819
Members
414,179
Latest member
anthelsene

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